Personal Hammerspoon configuration and shareable spoons.
Learn Hammerspoon - installation instruction and nice learning course.
Mac Spoons Tweaks
is a SwiftUI macOS app that installs and configures the Spoons in
this repo — and any third-party catalog that publishes a compatible
spoons.json. It reads each Spoon's spoon-manifest.json to render
a typed config form, then writes a managed init.lua snippet and
applies changes live through the hs CLI. No hand-editing your
Hammerspoon config.
brew install --cask catokolas/tap/macspoonstweaksStandalone clone + symlink instructions for each Spoon are below if you'd rather wire things up manually.
-
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. Middle-click pastes the active buffer at the cursor location — only inside text, never on buttons / links / other UI. SetenableMiddleClickPaste = falseto disable. 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. Useshs.eventtapfor input and direction inversion. If the companion native helperHS_ModulesContrib-smoothscrollis installed (see below), the smoothing engine runs asIsContinuous=1CGEvents posted from aCVDisplayLinkcallback — a trackpad-style continuous scroll stream with proper momentum, which apps treat as one logical gesture (one wheel click → one visible scroll step in every app); otherwise falls back to an inline pure-Lua smoothing engine. -
MouseTrackpadTweaks.spoon/— per-device input tweaks for the Magic Mouse and Trackpad that macOS doesn't expose itself. Magic-Mouse-only scroll inversion (vertical and optional horizontal) — independent of the system "Natural scrolling" toggle, so you can keep the trackpad natural while the mouse scrolls traditionally. Inversion follows the whole gesture + momentum tail via scrollPhase / momentumPhase tracking, so there's no "bounce" when the finger leaves the surface. Deltas are flipped on the original CGEvent in place, preserving the OS's gesture metadata (source, timestamp, gesture id), so the momentum tail decays as smoothly as a native scroll. Middle-click synthesis on either a 3+ finger tap/click or a 1-finger tap/click in a configurable top-center region of the device surface; each mode picks "tap", "click", or "either" independently. The top-center rule counts only touches inside the region, so Magic Mouse passive palm contacts elsewhere don't disqualify an intentional finger. Uses the companion native helperHS_ModulesContrib-multitouchto read multitouch data (see below); without it the Spoon loads cleanly and passes events through unmodified. -
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). -
MouseMoveResizeWindows.spoon/— hold a configurable modifier chord and drag anywhere inside a window to move or resize it — no need to aim for the title bar or a corner. The Mutter / GNOME "Super+drag" muscle memory, ported to macOS with a modifier that doesn't fight the system shortcuts (Option by default). Left-drag moves the window tracking the cursor; right-drag resizes by moving the closest edge (left, right, top, or bottom — picked once at mouse-down from the four edge-distances). Releasing the modifier mid-drag aborts cleanly; clicks without the modifier pass through untouched. Resize is throttled to ~30Hz with a flush on mouse-up so terminal-grid-heavy apps (iTerm + tmux) stay responsive without losing precision. The modifier chord is exposed to MacSpoonsTweaks via a newmodifierCombofield type — any subset ofctrl,alt,shift,cmd,fn, set by the user with the same recorder-style picker the app uses for hotkeys.
-
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. -
HS_ModulesContrib-multitouch— native Hammerspoon module that streams per-touch events from the Magic Mouse and Trackpad via Apple's private MultitouchSupport framework. Exposes finger count, normalized per-finger surface position, and touch phase (began / moved / ended) — none of which is reachable from Hammerspoon's pure-Lua API.MouseTrackpadTweaks.spoonpicks the module up automatically when installed under~/.hammerspoon/hs/_ckol/multitouch/. -
HS_ModulesContrib-smoothscroll— native Hammerspoon module that posts continuous-scroll CGEvents (NSEventTypeScrollWheelwithIsContinuous=1) from aCVDisplayLinkcallback — the same event shape macOS trackpads emit during a gesture, with smoothly decreasing per-frame deltas during the momentum tail. Receiving apps treat the whole stream as one logical scroll, so a single wheel click produces one visible scroll step with the same magnitude in every app (instead of being defeated by macOS's discrete-wheel coalescing).MouseScrollTweaks.spoonpicks the module up automatically when installed under~/.hammerspoon/hs/_ckol/smoothscroll/; without it, the Spoon falls back to an inline pure-Lua smoothing engine.