Format issue with Hammerspoon

This commit is contained in:
Howard Abrams 2026-09-17 17:07:57 -07:00
parent aaf9533c56
commit 3d57252d02

View file

@ -2,7 +2,7 @@
#+author: Howard X. Abrams #+author: Howard X. Abrams
#+date: 2025-11-24 #+date: 2025-11-24
#+filetags: emacs hamacs #+filetags: emacs hamacs
#+lastmod: [2026-08-12 Wed] #+lastmod: [2026-09-11 Fri]
A literate programming file for configuring Hammerspoon. A literate programming file for configuring Hammerspoon.
@ -68,69 +68,78 @@ Ive created left and right ~Meh~ keys on my Moonlander keyboard:
To create specific key bindings for starting applications, I can: To create specific key bindings for starting applications, I can:
#+BEGIN_SRC lua #+BEGIN_SRC lua
---------------------------------------------------------------------- ----------------------------------------------------------------------
-- Launcher replaces iCanHazShortcuts -- Launcher replaces iCanHazShortcuts
hs.hotkey.bind({"alt", "ctrl", "shift"}, "T", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "S", function()
hs.application.launchOrFocus("iTerm") hs.application.launchOrFocus("Slack")
end) end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "S", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "F", function()
hs.application.launchOrFocus("Slack") hs.application.launchOrFocus("Firefox")
end) end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "F", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "C", function()
hs.application.launchOrFocus("Vivaldi") hs.application.launchOrFocus("Google Chrome")
end) -- hs.execute("~/bin/chrome.scr")
end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "C", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "G", function()
-- hs.osascript.applescriptFromFile("~/bin/chrome.scr") hs.application.launchOrFocus("Gmail")
hs.execute("~/bin/chrome.scr") end)
end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "B", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "J", function()
hs.application.launchOrFocus("Microsoft Outlook") hs.application.launchOrFocus("JIRA")
end) end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "Z", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "B", function()
hs.application.launchOrFocus("zoom.us") hs.application.launchOrFocus("Google Calendar")
end) end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "Q", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "Z", function()
hs.application.launchOrFocus("KeepassXC") hs.application.launchOrFocus("zoom.us")
end) end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "G", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "Q", function()
hs.application.launchOrFocus("Ghostty") hs.application.launchOrFocus("KeepassXC")
end) end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "W", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "V", function()
hs.application.launchOrFocus("VLC") hs.application.launchOrFocus("VLC")
end) end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "E", function() hs.hotkey.bind({"alt", "ctrl", "shift"}, "W", function()
hs.execute("FOR_WORK=yes open -a /Applications/Emacs.app") hs.application.launchOrFocus("Mail")
end) end)
-- Special Emacs Guys hs.hotkey.bind({"alt", "ctrl", "shift"}, "T", function()
-- Right Meh key: hs.application.launchOrFocus("iTerm")
hs.hotkey.bind({"alt", "ctrl", "shift"}, "X", function() end)
hs.execute("~/bin/emacs-capture")
end)
-- Left Meh key: hs.hotkey.bind({"alt", "ctrl", "shift"}, "E", function()
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "X", function() hs.execute("FOR_WORK=yes open -a /Applications/Emacs.app")
hs.execute("~/bin/emacs-capture-clock") end)
end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "M", function() -- Special Emacs Guys
hs.execute("~/bin/emacs-capture-meeting") -- Right Meh key:
end) hs.hotkey.bind({"alt", "ctrl", "shift"}, "X", function()
hs.execute("~/bin/emacs-capture")
end)
-- Current music system is actually in Emacs: -- Left Meh key:
hs.hotkey.bind({"alt", "ctrl", "shift"}, "R", function() hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "X", function()
hs.execute("/opt/homebrew/bin/emacsclient -s work -e '(ready-player-toggle-play-stop)'") hs.execute("~/bin/emacs-capture-clock")
end) end)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "M", function()
hs.execute("~/bin/emacs-capture-meeting")
end)
-- Current music system is actually in Emacs:
hs.hotkey.bind({"alt", "ctrl", "shift"}, "R", function()
hs.execute("/opt/homebrew/bin/emacsclient -s work -e '(ready-player-toggle-play-stop)'")
end)
#+END_SRC
#+END_SRC #+END_SRC
* Zoom * Zoom
/Spoons/ are library extensions to Hammerspoon: usally small Lua scripts, like =init.lua=, stored in the =Spoons= subdirectory. Installable from a =git clone=, typically. To use the Zoom spoon, clone it: /Spoons/ are library extensions to Hammerspoon: usally small Lua scripts, like =init.lua=, stored in the =Spoons= subdirectory. Installable from a =git clone=, typically. To use the Zoom spoon, clone it: