Created
June 7, 2020 16:24
-
-
Save zhiyelee/b638e3819af3b1dbf3970c8432b04dd1 to your computer and use it in GitHub Desktop.
Hammerspoon app lunch shortcut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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