Note: This project was built with Claude Code. Code, documentation, and commit messages were AI-generated with human direction and review.
A tiny macOS menu bar agent for moving the focused window to another display. Trigger it with a hotkey, pick a display from a spatial overlay (think macOS Display → Arrange…), and the window jumps there — centered, at a reasonable size.
Built for multi-display setups where dragging a window across screens or remembering Mission Control corners is more friction than the move itself.
- Hotkey fires
open -g windowhop://show(via Raycast, Shortcuts, or any launcher that can run a shell command). - WindowHop captures the currently focused window, then shows a non-activating overlay with each display drawn in its real spatial arrangement. The overlay appears on the same display as the focused window (falling back to the cursor's display, then the main display, if the window's frame can't be read).
- Pick a display with arrow keys + return, or press its number. The window is moved there via the Accessibility API and centered at a reasonable size.
- Fullscreen / non-movable windows play a Tink and bail.
Requires macOS 14+.
Grab WindowHop.zip from the latest release, then:
unzip WindowHop.zip
xattr -dr com.apple.quarantine WindowHop.app # ad-hoc signed; clears Gatekeeper
mv WindowHop.app /Applications/
open /Applications/WindowHop.app # first launch — grant AccessibilityRequires a Swift toolchain.
./build.sh
mv WindowHop.app /Applications/
open /Applications/WindowHop.app # first launch — grant AccessibilityThe first launch shows a welcome window walking through Accessibility permission. WindowHop registers itself in the Accessibility list silently — no unsolicited TCC prompts — and the menu bar icon shows a warning state until the permission is granted.
WindowHop has no built-in hotkey; bind one with whatever launcher you use. The URL scheme is windowhop://show.
A Raycast Script Command is included:
ln -s "$PWD/raycast/windowhop.sh" ~/path/to/your/raycast/scripts/Or from the shell:
open -g windowhop://show- Arrow keys — move selection spatially across displays
1–9— pick a display by number and commit- Return — commit the current selection
- Esc — dismiss without moving
Sources/windowhop/— Swift sources (SwiftPM target)main.swift— entry point +--export-iconCLI used by the build scriptAppDelegate.swift— menu bar, overlay lifecycle, URL-scheme handlingWindowMover.swift— Accessibility-API window capture + moveWelcomeWindow.swift— first-run permission flowWindowHopIcon.swift— Core Graphics icon, used for both the menu bar template image and the app icon
Resources/Info.plist— agent (LSUIElement) bundle,windowhop://URL schemebuild.sh—swift build, render the iconset by invoking the binary in--export-iconmode, runiconutil, assemble the.app, ad-hoc codesignraycast/windowhop.sh— Raycast Script Command
- WindowHop is an
LSUIElementagent — no Dock icon, just the menu bar item. - The overlay is a non-activating
NSPanelso the previously focused application stays frontmost; the focused window is captured before the panel appears. - Ad-hoc codesigning means the binary's hash changes on every rebuild and TCC may need a fresh grant. WindowHop nudges the system into re-registering on launch, so usually just toggling the Accessibility entry off/on is enough.
