Skip to content
bjreathPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Snap icon

Snap

Keyboard-driven window tiling for Apple Silicon Macs.
Press ⌘ ⇧ Space, then a number. That's the whole interface.

Snap's layout picker floating over the desktop


Why

For years, Divvy was the way to tile windows on a Mac: one global shortcut, a panel, a keypress, done. But Divvy hasn't been updated in years. It ships as an Intel-only binary that runs only under Rosetta 2, and Apple is winding Rosetta down.

Snap keeps the part of Divvy that people actually use day to day, the shortcut → number → snapped window reflex. It's a native arm64 app, written from scratch in about 500 lines of Swift.

How it works

  1. Focus any window.
  2. Press ⌘ ⇧ Space. A small panel appears with a preview of each layout.
  3. Press a digit. The window snaps into place, and the tile you picked lights up as the panel fades out.

Layout 1 selected in the Snap panel

Press Esc to cancel. The panel also closes on its own after 4 seconds.

The window snaps to the display it's mostly on. The menu bar and Dock are left alone, because Snap uses the screen's visible area.

Snap vs. Divvy vs. built-in tiling

Since macOS Sequoia, macOS has had window tiling built in. You can drag a window to a screen edge, use Window → Move & Resize, or press Fn ⌃ with an arrow key to snap to a half. For many people that's enough, and you should try it before installing anything.

Snap is for when the built-in layouts aren't the ones you want.

Snap macOS built-in Divvy 1.5
Install Build from source ✅ Nothing to install App Store, paid
Apple Silicon ✅ Native arm64 ✅ ❌ Intel only, needs Rosetta 2
Maintained ✅ ✅ ❌ No updates in years
Layouts Any size or position you define Fixed set: full, halves, quarters Any, chosen on a grid
Keyboard flow One hotkey, then a digit A separate chord for each layout Shortcut per layout, or the grid
Shows a preview ✅ Panel with every layout ❌ ✅ Grid panel
Mouse Not needed ✅ Drag to edges ✅ Drag on the grid
Menu bar / Dock icon None, runs invisibly None Menu bar icon
Config Plain JSON you can version and diff System Settings GUI preferences
Source ~500 lines of Swift, all in this repo Closed Closed

Compared with macOS, Snap's advantage is custom layouts behind a single shortcut. macOS can't put a window at a quarter or three quarters of the screen's width, or at a centered 50% width. Each built-in layout also needs its own chord to remember. With Snap you remember one hotkey, and the panel shows you the rest. macOS wins on zero setup and mouse-driven tiling, and you can use both side by side.

Compared with Divvy, Snap is intentionally smaller. It has no drag-to-select grid and no separate global shortcut per layout. One hotkey and ten slots cover the everyday workflow with almost nothing to configure.

Layouts

Layouts live in ~/.config/snap/layouts.json. Snap creates the file on first run and re-reads it every time you press the hotkey, so edits take effect immediately without a restart.

Each key is a digit from 0 to 9. Each value is [x, y, width, height] as fractions of the screen, measured from the top-left corner:

{
  "0": [0, 0, 1, 1],
  "1": [0, 0, 0.5, 1],
  "2": [0.5, 0, 0.5, 1],
  "3": [0, 0, 0.25, 1],
  "4": [0.25, 0, 0.75, 1]
}
Key Layout
0 Full screen
1 Left half
2 Right half
3 Left quarter
4 Right three quarters

Some more to add:

"5": [0, 0, 1, 0.5],
"6": [0, 0.5, 1, 0.5],
"7": [0.25, 0.1, 0.5, 0.8],
"8": [0, 0, 0.333, 1],
"9": [0.333, 0, 0.667, 1]

These are the top half, bottom half, a centered window, the left third and the right two thirds.

Install

Requirements:

  • An Apple Silicon Mac on macOS 14 or later
  • Xcode Command Line Tools: xcode-select --install

Then build and install:

git clone https://github.com/bjreath/snap.git
cd snap
./install.sh

install.sh does the following:

  • Compiles Snap and draws its icon
  • Signs the app
  • Copies the app to ~/Applications/Snap.app
  • Registers a LaunchAgent so Snap starts at login and restarts if it crashes

On first launch, macOS asks you to grant Snap Accessibility access, which it needs to move other apps' windows. Allow it in System Settings → Privacy & Security → Accessibility.

Tip: If you have an Apple Development certificate in your keychain, install.sh signs with it. The Accessibility grant then survives rebuilds. With the ad-hoc signature, macOS treats each rebuild as a new app and you have to grant access again.

To uninstall:

./uninstall.sh

This removes the app and the LaunchAgent but keeps your layouts file.

Troubleshooting

⌘ ⇧ Space opens Siri instead. Recent versions of macOS bind this shortcut to Ask Siri about active window. Turn it off in System Settings → Keyboard → Keyboard Shortcuts → Screenshots.

The panel appears but windows don't move. Snap doesn't have Accessibility access. Remove Snap from the Accessibility list, add ~/Applications/Snap.app again, and run ./install.sh.

Anything else. Snap writes startup and error messages to ~/Library/Logs/Snap.log.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages