← Back
OneDisplay
Technical skills demonstrated in this project
Core display management
- Uses CGDisplayCapture to take exclusive control of the built-in display, rendering it black and inactive when an external monitor is connected.
- Monitors display connection/disconnection via NSNotificationCenter and restores the laptop screen on disconnect.
- Clamshell-aware: blanking respects whether the laptop lid is open or closed.
Menu bar app
- Lightweight menu bar utility with SwiftUI for the popover and AppKit for display management.
- Launch at Login support via SMAppService (macOS 13+).
- Hide icon mode — runs silently in the background.
- Handles sleep/wake events gracefully, re-blanking on wake if a monitor is still connected.
Build & dependencies
- Pure Swift — zero external dependencies.
- Makefile-based build system with targets for build, bundle, run, and icon generation.
- MIT licensed, supports Apple Silicon and Intel Macs on macOS 13+.
Swift