Created
March 11, 2020 19:46
-
-
Save jjaaccoobb/606f96a4d943929e5d36c8949c526d02 to your computer and use it in GitHub Desktop.
System-wide shortcut/global hotkey for alacritty terminal using Hammerspoon
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
hs.hotkey.bind({"ctrl"}, "space", 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