Format issue with Hammerspoon
This commit is contained in:
parent
aaf9533c56
commit
3d57252d02
1 changed files with 59 additions and 50 deletions
109
hammerspoon.org
109
hammerspoon.org
|
|
@ -2,7 +2,7 @@
|
|||
#+author: Howard X. Abrams
|
||||
#+date: 2025-11-24
|
||||
#+filetags: emacs hamacs
|
||||
#+lastmod: [2026-08-12 Wed]
|
||||
#+lastmod: [2026-09-11 Fri]
|
||||
|
||||
A literate programming file for configuring Hammerspoon.
|
||||
|
||||
|
|
@ -68,69 +68,78 @@ I’ve created left and right ~Meh~ keys on my Moonlander keyboard:
|
|||
|
||||
To create specific key bindings for starting applications, I can:
|
||||
#+BEGIN_SRC lua
|
||||
----------------------------------------------------------------------
|
||||
-- Launcher replaces iCanHazShortcuts
|
||||
----------------------------------------------------------------------
|
||||
-- Launcher replaces iCanHazShortcuts
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "T", function()
|
||||
hs.application.launchOrFocus("iTerm")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "S", function()
|
||||
hs.application.launchOrFocus("Slack")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "S", function()
|
||||
hs.application.launchOrFocus("Slack")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "F", function()
|
||||
hs.application.launchOrFocus("Firefox")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "F", function()
|
||||
hs.application.launchOrFocus("Vivaldi")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "C", function()
|
||||
hs.application.launchOrFocus("Google Chrome")
|
||||
-- hs.execute("~/bin/chrome.scr")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "C", function()
|
||||
-- hs.osascript.applescriptFromFile("~/bin/chrome.scr")
|
||||
hs.execute("~/bin/chrome.scr")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "G", function()
|
||||
hs.application.launchOrFocus("Gmail")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "B", function()
|
||||
hs.application.launchOrFocus("Microsoft Outlook")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "J", function()
|
||||
hs.application.launchOrFocus("JIRA")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "Z", function()
|
||||
hs.application.launchOrFocus("zoom.us")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "B", function()
|
||||
hs.application.launchOrFocus("Google Calendar")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "Q", function()
|
||||
hs.application.launchOrFocus("KeepassXC")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "Z", function()
|
||||
hs.application.launchOrFocus("zoom.us")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "G", function()
|
||||
hs.application.launchOrFocus("Ghostty")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "Q", function()
|
||||
hs.application.launchOrFocus("KeepassXC")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "W", function()
|
||||
hs.application.launchOrFocus("VLC")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "V", function()
|
||||
hs.application.launchOrFocus("VLC")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "E", function()
|
||||
hs.execute("FOR_WORK=yes open -a /Applications/Emacs.app")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "W", function()
|
||||
hs.application.launchOrFocus("Mail")
|
||||
end)
|
||||
|
||||
-- Special Emacs Guys
|
||||
-- Right Meh key:
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "X", function()
|
||||
hs.execute("~/bin/emacs-capture")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "T", function()
|
||||
hs.application.launchOrFocus("iTerm")
|
||||
end)
|
||||
|
||||
-- Left Meh key:
|
||||
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "X", function()
|
||||
hs.execute("~/bin/emacs-capture-clock")
|
||||
end)
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "E", function()
|
||||
hs.execute("FOR_WORK=yes open -a /Applications/Emacs.app")
|
||||
end)
|
||||
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "M", function()
|
||||
hs.execute("~/bin/emacs-capture-meeting")
|
||||
end)
|
||||
-- Special Emacs Guys
|
||||
-- Right Meh key:
|
||||
hs.hotkey.bind({"alt", "ctrl", "shift"}, "X", function()
|
||||
hs.execute("~/bin/emacs-capture")
|
||||
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)
|
||||
-- Left Meh key:
|
||||
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "X", function()
|
||||
hs.execute("~/bin/emacs-capture-clock")
|
||||
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
|
||||
* 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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue