Skip to content

Instantly share code, notes, and snippets.

@Integralist
Created January 5, 2025 10:34
Show Gist options
  • Save Integralist/1b5ee79a9d128407c7daabd72a1abf27 to your computer and use it in GitHub Desktop.
Save Integralist/1b5ee79a9d128407c7daabd72a1abf27 to your computer and use it in GitHub Desktop.
[macOS automation with Hammerspoon] #hammer #hammerspoon #os #automation #macos #shell #lua
hs.hotkey.bind({"cmd"}, "escape", function()
local ghostty = hs.application.find("Ghostty")
if ghostty and ghostty:isFrontmost() then
ghostty:hide()
else
hs.application.launchOrFocus("Ghostty")
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment