Personal Hammerspoon configuration and shareable spoons.
Learn Hammerspoon - installation instruction and nice learning course.
-
FocusFollowsMouse.spoon/— X11-style sloppy focus for macOS. When the mouse comes to rest over a window that isn't already focused, that window is focused. Debounce, drag-suppression, and per-app exclusions are configurable. If the companion native helperHS_ModulesContrib-sloppyfocusis installed (see below) it focuses without raising the window; otherwise it falls back tohs.window:focus()(which raises). -
MouseCopyPasteSelection.spoon/— X11-style copy-on-select for macOS. Releasing the mouse after dragging across text, or double-clicking a word, captures the selection. By default it goes into a private selection buffer (the X11 PRIMARY analogue) so your real Cmd+C / Cmd+V clipboard is never disturbed; setuseSeparateSelectionBuffer = falsefor the legacy shared-clipboard model. Optional middle-click-to-paste at the cursor location (enableMiddleClickPaste = true) reads from whichever buffer is active. A toggle on|off hotkey shows anhs.alertbanner for visual feedback. -
MouseScrollTweaks.spoon/— tweaks for traditional mouse wheels on macOS, leaving trackpad / Magic Mouse alone. Per-axis direction inversion (vertical and horizontal independently) lets you keep system "Natural scrolling" on for the trackpad while the wheel feels normal — macOS ties those two together by default. Asmoothnessgrade 0 (off) … 20 (longest) interpolates each discrete wheel tick into a short sequence of pixel-unit events for a buttery glide; consecutive ticks fuse into one longer glide. Trackpads and Magic Mouse are detected via thescrollWheelEventIsContinuousproperty and passed through untouched. Pure Lua viahs.eventtap— no native helper. -
SpotifyPlayPause.spoon/— auto play / pause Spotify based on screen state and the connected audio output device. Pauses on screen sleep / screensaver when a preferred audio device (headphones, AirPods, USB DAC, …) is connected, and resumes on wake — but only if this Spoon was the one that paused it, so manually-paused tracks stay paused. With no preferred device present at all, Spotify is paused regardless of screen state. Optionally auto-switches the macOS default audio output to the first matching preferred device, and offers a menubar "Pause Spotify for N hour(s)" dropdown with automatic resume. Fully event-driven viahs.caffeinate.watcher,hs.audiodevice.watcher, andhs.application.watcher. -
MoveSpaces.spoon/—⚠️ macOS 26.5 status: limited. Keyboard shortcut to move the currently-focused window to the macOS Space immediately to the left or right of the current Space, on the same screen. Useshs.spacesso the move itself is silent (no Mission Control flicker); an optionalfollowWindowsetting can make the viewer follow the window. Uses the companion native helperHS_ModulesContrib-movetospaceif available (see below).
-
HS_ModulesContrib-sloppyfocus— native Hammerspoon module for focus-without-raise via macOS SkyLight private APIs. Works on Chromium-based PWAs, which the standalone AutoRaise tool does not.FocusFollowsMouse.spoonpicks the module up automatically when it's installed under~/.hammerspoon/hs/_ckol/sloppyfocus/. Future native modules will live in similarly-named sibling repos. -
HS_ModulesContrib-movetospace— native Hammerspoon module for moving a window to a specific macOS Space via SkyLight private APIs. Bypasseshs.spaces.moveWindowToSpace, which silently no-ops on macOS 26+ for most windows.MoveSpaces.spoonpicks the module up automatically when installed under~/.hammerspoon/hs/_ckol/movetospace/. On macOS 26.5 the helper still only moves windows owned by the calling process (Hammerspoon itself); cross-process Space moves are gated at the WindowServer level. See the module README for details.