Created
May 8, 2020 01:02
-
-
Save emjayoh/ad01f6483256a98a5f6fb3bc7a6da14f to your computer and use it in GitHub Desktop.
Hammerspoon - kitty terminal + dropdown visor (Guake)
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
hs.hotkey.bind({}, "F15", 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") | |
app = hs.application.get("kitty") | |
end | |
app:mainWindow():moveToUnit'[100,50,0,0]' | |
app:mainWindow().setShadows(false) | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also I noticed that the positioning of the window doesn't work reliably on first start of Kitty. Here's my modified version of the script.