Skip to content

Instantly share code, notes, and snippets.

@olafkotur
Last active January 27, 2020 01:10
Show Gist options
  • Save olafkotur/5f39d64ce24951a8b6a62fba28b0373f to your computer and use it in GitHub Desktop.
Save olafkotur/5f39d64ce24951a8b6a62fba28b0373f to your computer and use it in GitHub Desktop.
Toggles a given application on MacOS to either turn on or off depending on current state, can be used with a single keyboard short cut
on run
set appName to "YOUR APP NAME"
if application appName is running then
tell application appName to quit
end if
if application appName is not running then
tell application appName to activate
end if
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment