You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presently, the script uses a polling loop to check the NSWorkspace's activeApplication (note: activeApplication is deprecated). It would be more efficient to register an observer for notification name NSWorkspaceDidActivateApplicationNotification, which notification is sent just as soon as an application is activated/focused.
Presently, the script uses a polling loop to check the
NSWorkspace
'sactiveApplication
(note:activeApplication
is deprecated). It would be more efficient to register an observer for notification nameNSWorkspaceDidActivateApplicationNotification
, which notification is sent just as soon as an application is activated/focused.I experimented with this approach in a currently private fork of this repository. Handling Ctrl+C / SIGINT was somewhat tricky, but I posted about how to do this on Stack Overflow:
https://stackoverflow.com/questions/49092405/how-to-register-a-sigint-handler-that-will-run-as-soon-as-ctrlc-is-pressed
The text was updated successfully, but these errors were encountered: