
Macos Window Management
Customize macOS SwiftUI windows and scene behavior.
Install
npx skills add robinebers/openusage --skill macos-window-management -g -a claude-code -y- Repository
- robinebers/openusage4.5k
- Category
- Mobile
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,153 tokens
- Runs scripts
- No, instructions only
What it does
Customize macOS SwiftUI windows and scene behavior. Use when tuning window chrome, drag regions, placement, restoration, launch behavior, or borderless windows.
Window Management
Overview
Use this skill to tailor each SwiftUI window to its job. Start by identifying
which scene owns the window (Window, WindowGroup, or a dedicated utility
scene), then customize the toolbar/title area, background material, resize and
restoration behavior, and initial or zoomed placement.
Prefer scene and window modifiers over ad hoc AppKit bridges when SwiftUI offers the behavior directly. Keep each window purpose-built: a main browser window, an About window, and a media player window usually want different chrome, resizability, restoration, and placement rules.
These APIs are macOS 15+ SwiftUI window/scene customizations. For older deployment targets, expect to use more AppKit bridging or availability guards.
Workflow
- Inspect the relevant scene declaration and classify the window role: main app navigation, inspector/detail utility, About/support window, media playback window, welcome window, or a borderless custom surface.
- Adjust toolbar and title presentation to match the content.
- If the toolbar background or entire toolbar is hidden, make sure the window still has a usable drag region.
- Refine window behavior for that role: minimize availability, restoration, resize expectations, and whether the window should appear at launch.
- Set default placement for newly opened windows and ideal placement for zoom behavior when content and display size matter.
- Build and launch the app with
macos-build-run-debugto verify the result in a real foreground.appbundle. - If SwiftUI scene/window modifiers are not enough, switch to
macos-appkit-interopfor a narrowNSWindowbridge rather than spreading AppKit through the view tree.
