macOS 13+ · native swift · MIT
Windowssnap shut
Press a key, the focused window lands where you saved it. 1.2 MB, no dependencies, no daemon, no account.
The default keys
Every one is a line in a JSON file. Hover a row to see where it lands.
| Layout | Shortcut | Region | Size |
|---|
Setup
macOS will not let any installer grant Accessibility, so there is one manual step. Snap It asks on launch: click Open System Settings and switch it on. Steps for your macOS.
Read the script before you pipe it: install.sh. Or build it from source.
One file you can read
One file: ~/Library/Application Support/SnapIt/config.json.
Positions are fractions, so a layout means the same thing on a laptop and a 6K display.
{
"gap": 0,
"grid": { "columns": 6, "rows": 6 },
"layouts": [
{
"id": "left-half",
"name": "Left Half",
"frame": { "x": 0, "y": 0, "width": 0.5, "height": 1 },
"shortcut": "cmd+alt+left"
}
]
}
Why it is this small
Three decisions did most of the work.
Fractions, not pixels
Four numbers between 0 and 1. Every display and resolution gets the same result.
The system's own hot keys
No event tap, no polling loop. macOS wakes the app only on a registered combination.
Nothing to configure twice
The menu, the settings window and the JSON file are one state.