From 3d57252d0268c9420f1a5b35f89a4ebd4b4e74c7 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Thu, 17 Sep 2026 17:07:57 -0700 Subject: [PATCH] Format issue with Hammerspoon --- hammerspoon.org | 109 ++++++++++++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 50 deletions(-) diff --git a/hammerspoon.org b/hammerspoon.org index 0f24567..a2a67cd 100644 --- a/hammerspoon.org +++ b/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: