Skip to content
PrivateVictories-MainPublic

About

Drag-first window snapping for Apple Silicon Macs

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

A window being dragged toward a screen edge, with a glass preview showing where it will land

Lattice

Drag-first window snapping for Apple silicon Macs. Free, open source, MIT.

Drag a window to a screen edge and a glass preview shows where it will land.
Drop anywhere else and nothing happens. That is the entire interface.


What it does

  • Left or right edge → left or right half of the screen.
  • Any corner → that quarter.
  • Top edge → maximize.
  • Anywhere else → nothing. Windows land exactly where you drop them.

Seven targets, all reachable by dragging. No grid to learn, no zones to author, no layout editor.

What makes it different

It stays out of the way. Lattice only reacts when the window itself is moving. Selecting text, dragging files, marquee-selecting, screenshot tools — none of it ever triggers a snap, because Lattice confirms the window actually moved before it draws anything, and never commits a drop it didn't preview first.

Keyboard optional. Shortcuts exist (Rectangle's standard bindings — ⌃⌥←/→ halves, ⌃⌥U/I/J/K quarters, ⌃⌥↩ maximize, ⌃⌥C center) but are off by default. Enable them from the menu bar if you want them; when off, zero hotkeys are registered and nothing can collide with your existing setup.

Native feel. The preview is a real piece of the system's frosted glass with spring motion — not a stroked rectangle. On a drop, the window lands inside the glass and the glass melts away.

Multi-display aware. Dragging a window across displays never flashes previews at the boundary — snap bands on shared edges arm only after a brief dwell, while outer edges respond instantly.

It costs nothing while idle. No timers, no polling, no background work — the process wakes only for the events it handles. Measured idle load rounds to zero, one process, well under 30 MB.

It is visible and quittable. A menu bar item shows whether snapping is live, reports its permissions honestly, can pause it (which genuinely stops all event access, not just ignores it), copies a full diagnostic report, and quits it. A background utility that watches mouse events owes you that.

Requirements

  • A Mac with Apple silicon (M1 or later). Intel Macs are not supported.
  • macOS 26 (Tahoe) or later.

Install

One command (recommended)

curl -fsSL https://raw.githubusercontent.com/PrivateVictories-Main/lattice/main/install.sh | sh

The script checks your machine, verifies the download's checksum and code signature, installs to /Applications, and opens Lattice. Apps installed this way launch without any security dialog — the quarantine flag browsers apply is never involved. (Read the script; it's short.)

Manual download

Download Lattice.zip from Releases, unzip, and move Lattice.app to Applications. Because Lattice is independently signed rather than notarized (see the FAQ), the first open needs three extra clicks:

First-open steps: click Done on the Not Opened dialog, then System Settings, Privacy and Security, Open Anyway

Build from source

git clone https://github.com/PrivateVictories-Main/lattice.git
cd lattice
swift test          # the full suite
./scripts/make-app.sh

Grant the two permissions

Lattice needs both of these, and tells you in its menu if either is missing — clicking the missing one takes you straight to the right settings pane. Snapping starts the instant both are on; no relaunch needed.

System Settings, Privacy and Security, Accessibility, turn on Lattice

System Settings, Privacy and Security, Input Monitoring, turn on Lattice

Why those permissions, and what happens with them

Permission What Lattice uses it for
Accessibility Reading window positions, and moving the one window you dragged — once, when you release it.
Input Monitoring Seeing mouse drags, through a listen-only tap that cannot alter or delay your input.

Lattice contains no networking code at all. Nothing you do leaves your Mac. No telemetry, no analytics, no accounts, no update phone-home. The installer script above is the only thing that ever touches the network, and you run that yourself.

If snapping stops working

Open the menu bar item — the first line tells you the truth ("Snapping is on" is only shown when the event tap is genuinely live). If macOS's permission switches look on but nothing works, the stored permission has gone stale — a known macOS quirk with re-signed apps, and toggling the switch does not fix it. Use Reset Permissions… in the menu, which clears both entries properly so macOS asks again from scratch.

FAQ

Why isn't it notarized? Notarization requires Apple's $99/year developer program. Lattice is free software from an independent developer, signed with a stable certificate instead — the same approach used by respected open tools like AeroSpace. The signature is verified by the installer, its identity never changes between releases (which is what keeps your permission grants working across updates), and every release ships a checksum. Or build it from source — it's MIT.

Why not the Mac App Store? Impossible, not just unchosen: sandboxed apps cannot use the accessibility APIs any window manager needs.

Does it conflict with Rectangle / Magnet / native macOS tiling? Running two drag-snappers at once is undefined behaviour for both. Lattice detects the common ones and macOS's own drag-to-edge tiling, and its diagnostics will tell you about the conflict.

Something's wrong — how do I report it usefully? Menu bar → Copy Diagnostics, paste it into a new issue. That report contains your display layout and permission state, and nothing personal.

License

MIT. ACKNOWLEDGEMENTS.md records the projects that were studied while building this, and the clean-room discipline that was kept while doing it.


© 2026 Ryan Stallings · MIT licensed — see LICENSE

About

Drag-first window snapping for Apple Silicon Macs

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages