Skip to content

Instantly share code, notes, and snippets.

@nebjak
Created November 17, 2025 10:58
Show Gist options
  • Select an option

  • Save nebjak/ac53acc64909c94eec89a3fda3e5c328 to your computer and use it in GitHub Desktop.

Select an option

Save nebjak/ac53acc64909c94eec89a3fda3e5c328 to your computer and use it in GitHub Desktop.
Hammerspoon Init
-- Helper function to create launch-or-focus hotkey bindings
local function bindLaunchOrFocus(mods, key, appName)
hs.hotkey.bind(mods, key, function()
hs.application.launchOrFocus(appName)
end)
end
-- Application launch shortcuts
bindLaunchOrFocus({ "alt" }, "t", "Alacritty")
bindLaunchOrFocus({ "alt" }, "b", "Brave")
bindLaunchOrFocus({ "alt" }, "s", "Spotify")
bindLaunchOrFocus({ "alt" }, "r", "RustRover")
bindLaunchOrFocus({ "alt" }, "z", "Zed")
-- Reload Hammerspoon config
hs.hotkey.bind({ "cmd", "alt", "ctrl" }, "r", function()
hs.reload()
end)
hs.alert.show("Config loaded")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment