Skip to content

About

Native macOS window manager with cycling zones (FancyZones-style for Mac)

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

WindowLatch — a free, open-source window manager for macOS

Latest release License: MIT Platform: macOS 26+ Built with Swift 6

A fast, focused window manager for macOS. ⬇ Download the latest .dmg — ~2 MB, no installer, no account.

Cycle the focused window through ⅔ → ½ → ⅓ zones with one keyboard shortcut per direction. Combine directions for quadrants. Jump across monitors when you run out of room. Inspired by Microsoft PowerToys' FancyZones.

Why WindowLatch

  • It cycles the right way. Press ⌃⌥ ← once → left ⅔. Again → left ½. Again → left ⅓. Stop guessing which keystroke gives you which size.
  • It works across monitors. When the cycle exhausts, the window leaps to the next display. Press the opposite arrow within 1.5 s to snap straight back.
  • It does directional combos. ⌃⌥ ← then ⌃⌥ ↑ = top-left quadrant. No extra keys to memorise.
  • It respects each monitor. Configure halves / thirds / quarters independently per display — your ultrawide and your 4K don't have to agree.
  • It's a 2 MB download. Native Swift + AppKit. No Electron, no background daemons, no analytics.
  • It updates itself. New versions install from the menu bar, and the Accessibility permission carries over.
  • It's MIT-licensed and open source. Read the code. Fork it.

WindowLatch — four windows snapped into a clean grid on a macOS desktop

Default shortcuts

Action Shortcut
Cycle Left ⌃⌥ ←
Cycle Right ⌃⌥ →
Cycle Up ⌃⌥ ↑
Cycle Down ⌃⌥ ↓

The modifier is reconfigurable in Settings (Ctrl+Option, Ctrl+Cmd, Cmd+Option, or Ctrl+Cmd+Shift). The arrow keys are fixed.

Features

  • Cycle: ⅔ → ½ → ⅓ in any direction. Press the same arrow until the size feels right.
  • Cross-monitor jump: at cycle exhaustion, the window leaps to the adjacent display.
  • Jump-back: press the opposite arrow within 1.5 s to return to the original monitor.
  • Reverse cycle: press the opposite arrow to step back through the previous direction's sequence.
  • Directional combos: ⌃⌥ ← then ⌃⌥ ↑ within 1.5 s = top-left quadrant.
  • Per-monitor zone configuration: enable/disable halves, thirds, and quarters independently per display.
  • Configurable gap, cycle reset delay, and modifier key.
  • Menu-bar app — no Dock clutter.
  • Auto-update: checks GitHub Releases for new versions (after asking you once), or on demand with Check for Updates… in the menu.

Install

From GitHub Releases (recommended)

  1. Download WindowLatch-vX.Y.Z.dmg from Releases.

  2. Open the .dmg and drag WindowLatch to /Applications.

  3. First launch. The build is signed with WindowLatch's own certificate but not notarised by Apple, so Gatekeeper blocks it. On macOS 15 and later the old right-click → Open trick no longer works — use the steps below:

    1. Double-click WindowLatch. macOS shows "Apple could not verify 'WindowLatch' is free of malware…" — click Done (the app does not open yet).
    2. Open System Settings → Privacy & Security and scroll down. You'll see "WindowLatch was blocked to protect your Mac." — click Open Anyway.
    3. Authenticate with Touch ID or your password, then click Open Anyway in the final confirmation dialog.

    You only do this once — afterwards WindowLatch launches like any other app.

  4. Grant Accessibility when prompted (see below).

WindowLatch is a menu-bar app — once running, look for its icon in the menu bar, not the Dock. To have it start automatically, add it under System Settings → General → Login Items.

Verify the download (optional)

The release is built by GitHub Actions straight from a tagged commit — no manual upload. To confirm the .app is the unmodified release build:

codesign --verify --deep --strict --verbose=2 /Applications/WindowLatch.app
# expected: "valid on disk" and "satisfies its Designated Requirement"
codesign -d -r- /Applications/WindowLatch.app 2>&1 | grep designated
# expected: certificate leaf = H"6677765cd4bd5c85108b1b925e74fa3039e12a27"

Build from source

git clone https://github.com/fabiomsnunes/WindowLatch.git
cd WindowLatch
open WindowLatch.xcodeproj
# ⌘R in Xcode

Requires Xcode 16 or later, deployment target macOS 26 (Tahoe).

Accessibility permission

WindowLatch needs Accessibility to move and resize windows of other apps — it's the only API macOS exposes for this. The app reads window positions and updates them when you press a shortcut. Nothing else is read or transmitted.

On first launch the onboarding screen explains this and links to the right pane:

System Settings → Privacy & Security → Accessibility → toggle WindowLatch on.

You grant it once. Every release is signed with the same certificate, so macOS keeps the permission when you update. Updating from 1.0.2 or earlier: those releases were ad-hoc signed, and macOS keeps their old Accessibility entry, which no longer matches the new signature. The toggle shows as on but shortcuts do nothing. Once, after updating, open Settings → Reset Accessibility Permission (or remove WindowLatch from the Accessibility list with − and add it again), then grant it. From then on it carries over.

The app detects the change automatically — no restart needed.

Roadmap

  • Drag & snap with zone overlay (next) — hold a modifier key while dragging a window to reveal a FancyZones-style overlay highlighting the available zones; release to snap.

Have an idea? Open an issue.

Limitations

  • Electron / non-native apps (VS Code, Slack, Discord) sometimes resist setSize and snap back. Native apps and well-behaved Cocoa apps work perfectly.
  • Fullscreen Spaces: WindowLatch can't move a window that's currently in a dedicated fullscreen Space. Exit fullscreen first.
  • Screen Recording-style apps that take over the display may capture global shortcuts before WindowLatch sees them.

Architecture

  • Swift 6 + SwiftUI (Settings) + AppKit (menu bar, windows)
  • Accessibility API for window manipulation
  • KeyboardShortcuts by Sindre Sorhus for global hotkeys
  • Sparkle for updates, verified with an EdDSA signature on every release
  • Pure CycleEngine state machine — fully unit-tested, no AX or Date.now dependency
  • ScreenAdjacency is a pure helper — also unit-tested
  • Hybrid persistence: UserDefaults (gap, delay, modifier) + JSON (per-monitor zone groups)

Contributing

PRs welcome. Before committing, run:

swiftformat .
xcodebuild test -scheme WindowLatch -destination 'platform=macOS' -only-testing:WindowLatchTests

CI runs SwiftFormat lint on every PR. Tests must pass locally before cutting a release tag.

To cut a release, bump both MARKETING_VERSION and CURRENT_PROJECT_VERSION (Sparkle compares the build number), then push a vX.Y.Z tag matching MARKETING_VERSION. The release workflow signs the app, builds the .dmg and publishes it with its appcast.xml.

FAQ

How is this different from Rectangle, Magnet, or Moom? The cycle behaviour. WindowLatch presses the same arrow repeatedly to step through ⅔ → ½ → ⅓ — Rectangle and Magnet require separate shortcuts for each size, Moom needs you to open a palette. WindowLatch also auto-jumps to the next monitor when the cycle exhausts, which none of them do natively.

Does it phone home? Only to look for updates. On second launch it asks whether to check automatically; if you say yes, it fetches appcast.xml from this repo's GitHub Releases about once a day. Sparkle sends nothing else: no analytics, no system profile. Say no, and it only checks when you pick Check for Updates….

Will it work on macOS 15 or earlier? Not in this release. The deployment target is macOS 26 (Tahoe). Backporting is possible but not planned.

Why self-signed instead of notarised? Apple Developer notarisation costs €99/year for a personal-use, free app. A self-signed certificate means one extra Gatekeeper click on first launch, then it's invisible, and the Accessibility permission carries over between updates.

License

MIT — © 2026 Fábio Nunes.

Acknowledgements

Inspired by Microsoft PowerToys FancyZones. Built on top of Sindre Sorhus's KeyboardShortcuts and Sparkle.

About

Native macOS window manager with cycling zones (FancyZones-style for Mac)

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages