SnapState – Native Swift Window Manager for macOS
SnapState captures and restores your entire macOS workspace including window positions, monitor layouts, and browser tabs with a single keyboard shortcut.
TL;DR
TL;DR: SnapState is a native Swift macOS utility that saves and restores your complete workspace layout — windows, monitors, and browser tabs — using global keyboard shortcuts. No Electron, no bloat.
Source and Accuracy Notes
- Product: getsnapstate.com
- GitHub: github.com/SoulSniper-V2/SnapState
- HN Show HN: news.ycombinator.com/item?id=48335834
- Author: Soulsniper-V2 (Arush)
What Is SnapState?
SnapState solves a problem every power user faces: context switching destroys your workspace. You finish a focused coding session, jump to a meeting, check Slack, and now your carefully arranged windows are scattered. Manually restoring everything takes minutes you do not have.
SnapState captures the complete state of your macOS workspace and restores it instantly. Window positions, monitor configurations, open browser tabs — everything. One keystroke.
The project is notable because it is built entirely in Swift using native macOS APIs. No Electron, no runtime overhead. It installs as a lightweight macOS app that runs as a menu bar agent.
Key Features
Window Position Mapping
SnapState reads and writes exact pixel coordinates for every window on every display. It maps the full geometry of your workspace including windows that span multiple monitors.
Monitor Layout Restoration
Switch between workspace configurations for different tasks. Dual-monitor coding setup on the left, single-monitor presentation mode on the right. SnapState remembers both.
Browser Tab Sync
Deep integration with browsers captures open tabs alongside native app windows. Full workspace includes your browser state, not just local apps.
Global Keyboard Triggers
Assign shortcuts to saved workspace states. The default binding uses Command+Control+1 through 6 to trigger named snapshots. The HN author notes this was inspired by Cluely, an AI companion app with a similar instant-recall interface.
Zero-Footprint Agent
Runs as a menu bar app with minimal resource usage. No background process hogging RAM when you are not actively switching workspaces.
Setup Workflow
Option1: Homebrew (Recommended)
brew install --cask snapstate
After installation, launch SnapState from Applications. It appears as a menu bar icon.
Option 2: Build from Source
git clone https://github.com/SoulSniper-V2/SnapState.git
cd SnapState
open SnapState.xcodeproj
Open the Xcode project and run on your Mac. You need Xcode installed.
First Launch
- Grant accessibility permissions when prompted (required for window position control)
- Grant screen recording permission (required for monitor layout detection)
- The menu bar icon appears with a camera-style snapstate logo
- Press Command+Control+S to capture your current workspace
- Press Command+Control+1 to save the first named snapshot
Creating Named Snapshots
The interface lets you name snapshots and assign them to keyboard shortcuts. The architecture section on the SnapState site shows the subsystem design — window coordinate mapping, browser session capture, and hardware topology auditing are all separate modules.
Architecture Deep Dive
SnapState is organized into distinct subsystems:
- Window Coordinate Mapping — Reads window frames via the macOS accessibility API
- Deep Browser Session Spying — Queries browser state without relying on extension APIs
- Hardware Topology Auditing — Detects monitor configurations and resolution changes
- Global Keyboard Trigger — Registers system-wide hotkeys independent of focus state
- Zero-Footprint Agent — Menu bar residency with on-demand resource usage
The author recently added Homebrew installation support, signaling a push toward broader distribution.
Practical Evaluation Checklist
- Ease of use: Menu bar interface, global hotkeys, no configuration files
- Accuracy: Accessibility API gives precise window coordinates
- Performance: Native Swift, no Electron overhead
- Browser support: Works with Safari and Chrome tab state
- Multi-monitor: Supports complex spanning configurations
- Open source: MIT licensed, auditable security model
Security Notes
SnapState requires accessibility and screen recording permissions. These are standard for window management tools but grant significant system access. The project includes a SECURITY.md with a contact email for reporting vulnerabilities. The MIT license means you can audit the code before granting permissions.
FAQ
Q: Does SnapState work with full-screen apps or Spaces?
A: SnapState captures window positions and monitor layouts. Spaces switching is handled at the macOS level and may not be restored identically depending on your Spaces configuration.
Q: Can I export and import workspace snapshots?
A: The current release focuses on keyboard-triggered capture and restore. Export functionality is not yet documented but the data format is JSON-based and human-readable.
Q: Does it work with third-party window managers like Rectangle?
A: SnapState and Rectangle may conflict since both manipulate window positions via the accessibility API. Disable one when using the other.
Q: What macOS versions are supported?
A: The project targets modern macOS versions. Check the GitHub releases for specific version compatibility.
Conclusion
SnapState fills a real gap in the macOS ecosystem. The platform has excellent window tiling tools but no native way to save and restore complete workspace states. Doing it manually wastes time; doing it with a script requires maintenance.
The native Swift implementation is the key differentiator. Electron-based alternatives exist but carry runtime overhead that a menu bar utility should not need. SnapState is fast, lightweight, and open source.
If you switch contexts frequently — developers, designers, and anyone running multiple monitor setups — SnapState is worth installing. The zero-footprint agent model means it stays out of your way until you need it.
Try it: getsnapstate.com or install via Homebrew with brew install --cask snapstate