A lightweight macOS menu bar app that remembers your window layouts for each display configuration and restores them automatically when you connect or disconnect monitors. Dock your MacBook and every window snaps back exactly where it belongs.
- Auto-restore — reconnect a display and windows return to their saved spots.
- Per-display memory — each monitor configuration gets its own remembered layout.
- Stable display fingerprinting — matches monitors by EDID (manufacturer, model, serial), so it survives port changes and reboots.
- Resolution-change aware — scales window positions/sizes proportionally.
- Private — no accounts, no analytics, no network calls. Data stays in
~/Library/Application Support/Unplug/configurations.json.
Requires macOS 13 Ventura or later (Apple Silicon or Intel).
Sources/
UnplugEngine/ Display fingerprinting, detection, capture, restore, persistence
UnplugUI/ SwiftUI menu bar popover, settings, onboarding, shared AppState
UnplugApp/ @main app entry + AppCoordinator wiring engine to UI
Tests/ XCTest suites (19 tests: engine + UI + end-to-end)
scripts/ generate_icon.swift (programmatic app icon)
landing/ Next.js 15 marketing site
init.sh Build + test + bundle + (optional) sign/notarize/DMG
Unplug.entitlements Hardened-runtime entitlements for notarization
# Build, test, and bundle build/Unplug.app (unsigned, for local use)
./init.sh
# Install and launch
cp -R build/Unplug.app /Applications/
open /Applications/Unplug.appOn first launch Unplug asks for Accessibility permission (System Settings → Privacy & Security → Accessibility). It needs this to read and move windows; it never reads window contents and nothing leaves your Mac.
swift build # compile
swift test # 19 testscd landing
cp .env.example .env.local # then fill in NEXT_PUBLIC_BUY_URL etc.
npm install
npm run dev # http://localhost:3000
npm run build && npm run start # productionThe site's CTA links are configured entirely through NEXT_PUBLIC_* environment
variables (see landing/.env.example and landing/src/lib/config.ts) — no code
changes needed to point "Buy Now" / "Download" at a real Gumroad or Stripe link.
The app is distributed outside the Mac App Store, so it needs a Developer ID
signature + Apple notarization. init.sh automates this once you have a
certificate:
# Sign with Hardened Runtime + Unplug.entitlements
SIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)" \
./init.sh --release --sign
# Build a signed, notarized, stapled DMG (uses a notarytool keychain profile)
SIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)" \
NOTARY_PROFILE="unplug-notary" \
./init.sh --release --notarizeThe App Sandbox is intentionally not enabled: positioning other apps' windows via the Accessibility API is incompatible with sandboxing for a Developer-ID utility. Hardened Runtime is still on for notarization.
DisplayDetectorregisters aCGDisplayRegisterReconfigurationCallbackand debounces display changes.DisplayFingerprintbuilds a stable per-monitor ID from EDID (falling back to resolution when no serial is present); the set of fingerprints forms aconfigurationID.- On a known configuration,
LayoutRestorermoves each window back via the Accessibility API (matching by bundle ID + title, with scaling + offscreen clamping). On an unknown one,LayoutCapturesnapshots the current layout andConfigStorepersists it (max 20 configs, oldest pruned, JSON on disk).