A tiling window manager for macOS, built in Rust. Uses vim-style modal keybindings (like tmux) and a 12x12 grid model for precise window placement.
- Modal keybindings — Leader key (
Ctrl+Space) activates command mode, then single keys dispatch commands - 12x12 grid — Snap windows to presets (halves, thirds) or move/resize by grid units
- Lua config — Customize everything in
~/.config/lattice/init.luawith hot-reload - Menu bar daemon — Runs as a background process with a status bar icon
- macOS native — Uses Accessibility API and CGEventTap directly (no Electron, no SIP disable)
- macOS 13+
- Rust 1.85+ (edition 2024)
- Accessibility permission granted to the running terminal or binary
git clone git@github.com:charlesbthomas/lattice.git
cd lattice
cargo build --releaseThe binary is at target/release/lattice.
# Run the daemon (menu bar icon appears)
lattice
# Or via just
just runOn first launch, macOS will prompt for Accessibility permission. Grant it to your terminal app (if using cargo run) or to the lattice binary directly.
Press Ctrl+Space to enter command mode, then:
| Key | Action |
|---|---|
1 |
Left half |
2 |
Right half |
3 |
Left third |
4 |
Center third |
5 |
Right third |
6 |
Left two-thirds |
7 |
Right two-thirds |
f |
Full screen |
h/j/k/l |
Move window left/down/up/right by one grid unit |
H/J/K/L |
Shrink/grow window |
r |
Reload config |
q |
Quit |
Escape |
Cancel command mode |
Command mode times out after 2 seconds of inactivity.
Copy the default config and customize:
mkdir -p ~/.config/lattice
cp config/default.lua ~/.config/lattice/init.lualattice.grid { cols = 12, rows = 12 }
lattice.leader("ctrl+space")
lattice.bind("1", lattice.preset("left-half"))
lattice.bind("h", "move-left")
lattice.bind("H", "shrink-horizontal")Changes are picked up automatically (hot-reload).
crates/
lattice-core/ Platform-agnostic grid, commands, input state machine
lattice-macos/ AXUIElement wrappers, CGEventTap, window operations
lattice-config/ Lua runtime (mlua/LuaJIT), config loading, file watcher
lattice/ Binary: CLI, menu bar daemon, command dispatch
Requires just.
just check # fmt + check + clippy + test
just test # run tests
just clippy # lint
just fmt # format
just build # build debug
just run # run daemonMIT