Hide app after 60 seconds inactive and reset timer when app activated?


I have a macro, which hides an app (here Slack) after 60 seconds of deactivation:

This works, but has one problem: the timer is not reset when I activate the app. So, if I deactivate the app, activate it after 30 seconds. deactivate it, it will still de-activate after 30 more seconds.

How can I make this macro to be reset when I activate the app?

DO I have to write a macro which cancels this macro when I activate the app? Is there a more elegant solution, As I am maintaining several of these auto-hide scripts to keep my desktop clean?

This seems like one of the categories where Keyboard Maestro can technically do something, but I’d be more likely to use a specialty app for it.

For example, I could probably replace launchd and Hazel with Keyboard Maestro, but I don’t, because I think LaunchControl and Hazel are better tools for the job.

Likewise, if I wanted to do this, I think I’d use an app like

Hocus Focus - A Mac menu bar utility that hides your inactive windows

There are some others, too, but I cannot remember their names.

1 Like

Yes - I am trying Hocus Focus at the moment, but I would prefer to have the least tools as possible, and if I could integrate this in Keyboard Maestro, I could retire Hocus Focus again.