A simple macOS menu bar utility with three toggles:
- Dark Mode — switch system appearance via AppleScript
- Hide Desktop Icons — toggle Finder's
CreateDesktoppreference - Caffeinate — keep your Mac awake
Plus a Launch at Login toggle powered by SMAppService.
- macOS 14 (Sonoma) or later
- Xcode 16+ / Swift 6
The project uses XcodeGen to generate the Xcode project:
brew install xcodegen # if needed
xcodegen generate
open Swwwitch.xcodeprojOr build from the command line:
xcodegen generate
xcodebuild -scheme Swwwitch -configuration Release build| Feature | Implementation |
|---|---|
| Dark Mode | AppleScript → System Events |
| Hide Desktop Icons | defaults write com.apple.finder CreateDesktop + killall Finder |
| Caffeinate | /usr/bin/caffeinate process |
| Launch at Login | SMAppService.mainApp (no helper app needed) |
The app runs as a menu bar agent (LSUIElement) using SwiftUI's MenuBarExtra.
MIT
