Skip to content

Instantly share code, notes, and snippets.

@zhiyelee
Created June 7, 2020 16:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhiyelee/b638e3819af3b1dbf3970c8432b04dd1 to your computer and use it in GitHub Desktop.
Save zhiyelee/b638e3819af3b1dbf3970c8432b04dd1 to your computer and use it in GitHub Desktop.
Hammerspoon app lunch shortcut
--- start quick open applications
function open_app(name)
return function()
hs.application.launchOrFocus(name)
if name == 'Finder' then
hs.appfinder.appFromName(name):activate()
end
end
end
--- quick open applications
hs.hotkey.bind({"alt", "shift"}, "C", open_app("Visual Studio Code"))
hs.hotkey.bind({"alt", "shift"}, "G", open_app("Google Chrome"))
hs.hotkey.bind({"alt", "shift"}, "T", open_app("iTerm"))
hs.hotkey.bind({"alt", "shift"}, "S", open_app("Slack"))
--- end quick open applications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment