Skip to content

Instantly share code, notes, and snippets.

@revilon1991
Created June 29, 2025 08:03
Show Gist options
  • Save revilon1991/7e7a80ef6dca4ff44a2bc50a6a622c54 to your computer and use it in GitHub Desktop.
Save revilon1991/7e7a80ef6dca4ff44a2bc50a6a622c54 to your computer and use it in GitHub Desktop.
switch between mac apps by hotkeys
-- Install https://github.com/Hammerspoon/hammerspoon and put this in ~/.hammerspoon/init.lua
ctrlCmdShortcuts = {
{"]", "PhpStorm"},
{"[", "GoLand"},
{"'", "Spotify"},
{"/", "Safari"},
{"\\", "Slack"},
}
for i,shortcut in ipairs(ctrlCmdShortcuts) do
hs.hotkey.bind({"ctrl","cmd"}, shortcut[1], function()
hs.application.launchOrFocus(shortcut[2])
end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment