Skip to content

Instantly share code, notes, and snippets.

@bavovna
Created March 5, 2021 05:05
Show Gist options
  • Save bavovna/fb1a2c0073ba1bb2ac0e8da7a82321b3 to your computer and use it in GitHub Desktop.
Save bavovna/fb1a2c0073ba1bb2ac0e8da7a82321b3 to your computer and use it in GitHub Desktop.
~ > cat .hammerspoon/init.lua
# activate / deactivate kitty
hs.hotkey.bind({"ctrl", "shift"}, "`", function()
local app = hs.application.get("kitty")
if app then
if not app:mainWindow() then
app:selectMenuItem({"kitty", "New OS window"})
elseif app:isFrontmost() then
app:hide()
else
app:activate()
end
else
hs.application.launchOrFocus("kitty")
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment