Skip to content

Instantly share code, notes, and snippets.

@vyorkin
Created January 22, 2025 19:56
Show Gist options
  • Save vyorkin/7fe8cc1a70c18a2a084d18dd41ae4d66 to your computer and use it in GitHub Desktop.
Save vyorkin/7fe8cc1a70c18a2a084d18dd41ae4d66 to your computer and use it in GitHub Desktop.
Hammerspoon config
hs.window.animationDuration = 0
hs.window.setShadows(false)
local hyper1 = { "cmd", "alt", "ctrl", "shift" }
-- Launch and focus applications with below shortkey
hs.fnutils.each({
{ key = "e", app = "Arc" },
{ key = "f", app = "Google Chrome" },
{ key = "d", app = "Docker Desktop" },
{ key = "y", app = "Spotify" },
{ key = "k", app = "Neovide" },
{ key = "t", app = "Todoist" },
{ key = "b", app = "Books" },
{ key = "o", app = "Obsidian" },
{ key = "g", app = "Emacs" },
{ key = "i", app = "Kitty" },
{ key = "w", app = "Warp" },
{ key = "v", app = "OpenVPN Connect" },
{ key = "s", app = "slack" },
{ key = "q", app = "Telegram" },
{ key = "c", app = "Visual Studio Code" },
{ key = "h", app = "Zotero" },
}, function(o)
hs.hotkey.bind(hyper1, o.key, function()
hs.application.launchOrFocus(o.app)
end)
end)
hs.hotkey.bind(hyper1, "l", function()
hs.execute("open -n -a " .. "'neovide' --args --no-multigrid")
end)
-- Special handling for Zathura macOS automation sub
hs.hotkey.bind(hyper1, "u", function()
local app = hs.application.get("zathura")
if app then
app:activate()
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment