Minimizer is a native macOS menu-bar app. It has no Dock icon and uses a global hotkey plus status item controls to minimize every normal window to the Dock, then restore those windows and return focus to the originally active window.
- Swift 5.9 package for CLI builds.
- AppKit application target generated by XcodeGen.
- Carbon global hotkey registration.
- Accessibility API for window minimize, restore, and focus control.
- ServiceManagement
SMAppServicefor Launch at Login. - No third-party UI component libraries.
Keep both paths working:
- SwiftPM:
swift build -c release && ./build_app.sh - Xcode:
xcodegen generate, thenxcodebuild -project Minimizer.xcodeproj -scheme Minimizer -configuration Release -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build
After adding or removing source files, run xcodegen generate.
The minimize/restore engine is direct AX:
AXUIElementSetAttributeValue(window, kAXMinimizedAttribute, true/false)
Do not reintroduce NSRunningApplication.hide(), NSApplication.hideOtherApplications,
or Mission Control Show Desktop triggers. Keep App Nap protection and stable signing.
- Prefer small AppKit controllers and plain Swift helpers.
- Keep UI work on the main thread.
- Keep AX minimize/restore work serialized through
axQueue. - Use named helper types for testable logic.
- After adding source files, regenerate
Minimizer.xcodeprojfromproject.yml. - Do not leave temporary diagnostics, debug logs, or
printstatements in shipping code.
Before closing a task, run:
swift test
swift build -c release
./build_app.sh
xcodegen generate
xcodebuild -project Minimizer.xcodeproj -scheme Minimizer -configuration Release -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO buildFor runtime checks, kill existing instances, open Minimizer.app, and confirm
pgrep -lf "MacOS/Minimizer" shows one runtime instance.