BackPlace is a native macOS menu bar utility written in Swift and SwiftUI. It captures window layouts and restores them after monitor reconnects, sleep/wake cycles, or manual workspace switching.
MenuBarExtraapp with save, restore, layouts, and settings actions- Accessibility permission onboarding
- First-run welcome window and reusable tutorial/help window
- Local JSON layout storage with named layouts
- Display change and wake detection
- Window capture and restore via Accessibility APIs
- Quartz-based window discovery to improve matching
- Named layout management and ignored apps settings
- GitHub release update checks with in-app download flow
- Ko-fi support button and support/feedback settings area
- Feedback composer with GitHub issue submission support
- Optional app relaunch during restore retries
- Debug-friendly diagnostics through
os.Logger
PermissionsServiceScreenWatcherWorkspaceWatcherWindowDiscoveryServiceLayoutStoreRestoreEngineUpdateServiceFeedbackService
This repository is structured as a Swift package that can be opened directly in Xcode.
Command-line build in this environment uses the full Xcode toolchain explicitly:
HOME=/tmp/backplace-home \
CLANG_MODULE_CACHE_PATH=/tmp/backplace-modulecache \
SWIFTPM_MODULECACHE_OVERRIDE=/tmp/backplace-swiftpmcache \
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift build --disable-sandboxRun tests with:
HOME=/tmp/backplace-home \
CLANG_MODULE_CACHE_PATH=/tmp/backplace-modulecache \
SWIFTPM_MODULECACHE_OVERRIDE=/tmp/backplace-swiftpmcache \
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift test --disable-sandbox- The MVP does not attempt to reassign Spaces or Desktops.
Launch at loginrequires a normal bundled app build. It is included in the codepath, but macOS will reject registration from a non-bundled development run.- Automatic update checks read from the GitHub releases feed for
MoonTheRipper/BackPlace. - Feedback can submit directly to GitHub issues without an end-user GitHub account when either of these is configured in the app build:
- Environment variable:
BACKPLACE_GITHUB_FEEDBACK_TOKEN - Environment variable:
BACKPLACE_FEEDBACK_ENDPOINT - Info.plist string key:
BackPlaceGitHubFeedbackToken - Info.plist string key:
BackPlaceFeedbackEndpoint
- Environment variable:
- If no direct feedback transport is configured, BackPlace falls back to opening a prefilled GitHub issue draft in the browser.