Created
March 5, 2021 05:05
-
-
Save bavovna/fb1a2c0073ba1bb2ac0e8da7a82321b3 to your computer and use it in GitHub Desktop.
This file contains 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
~ > 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