Save your workspace. Restore it instantly.

A native macOS utility that captures and restores window positions, monitor layouts, and browser tabs with a single shortcut.

Download for macOSView Source
SnapState — INITIAL
FinderFileEditView
Fri 4:47 PM
main.rs — snap-state
// SnapState core activation routine
fn main() {
let store = WorkspaceStore::load();
let workspace = store.find("Development");
workspace.restore().unwrap();
}
snapstate.app/docs

System APIs Integration

SnapState utilizes Accessibility Services to query active window positions and programmatic layouts without root access.

AXUIElementAppleScript
zsh
$ snapstate restore dev
[info] Restoring workspace "Development"
[info] launched Safari (2.1s)
[ok] Window frames aligned successfully.
$ _
SnapState Design UI
HUD Wireframes72%
Notion — Product Spec
📝 Core Tasks
  • Audit Accessibility window API polling
  • Carbon global hotkey integrations
  • Window focus restoration
Spotify
Focus Beats
Lo-Fi Desktop
Telegram
Can you restore my window layouts immediately?
Done! ⌃⌘1 triggered. Safari, VS Code and Terminal are back in place.

See it in action

Instantly capture your layout and restore it anywhere, anytime.

Built on the macOS core.

Every feature taps directly into native system APIs — no fragile workarounds, no electron bloat.

Window Coordinate Mapping

Precisely captures the position and bounds of every on-screen window across all active spaces.

Kernel HookCGWindowListCopyWindowInfo

Deep Browser Session Spying

Reads active tab URLs and window state from supported browsers (Safari, Chrome, Edge, Brave, Arc) for full context restoration.

Kernel HookNSAppleScript Integration

Hardware Topology Auditing

Detects monitor arrangement and resolution changes to remap layouts onto the correct displays.

Kernel HookNSApplication.didChangeScreenParameters

Global Keyboard Trigger

Instantly restore target workspaces from any active application using system-wide hotkeys (⌃⌘1-6).

Kernel HookRegisterEventHotKey (Carbon)

Monitor Auto-Restore

Arms workspaces to trigger layout-only rebuilds automatically when screen setups change.

Kernel HookNSNotificationCenter Observer

Zero-Footprint Agent

Runs as a lightweight menu bar background process with no Dock icon and negligible resource overhead.

Kernel HookLSUIElement Subsystem

Subsystem architecture.

A breakdown of the implementation details that keep restores deterministic and fast.

01
Window Mutations

Leverages low-level AXUIElementSetAttributeValue system calls to programmatically inject kAXPositionAttribute and kAXSizeAttribute directly onto target windows.

02
State Serialization

Stores layout contexts into ~/Library/Application Support/SnapState/states.json using strict ISO-8601 timestamps and an optimized schema layout.

03
Settling Routines

Implements a precise 1.2-second post-launch thread settling interval to allow heavy system apps to spawn target window elements safely before layout adjustment.