A small macOS SwiftUI app that lets you adjust the spacing between menu bar status items. It reads and writes the NSStatusItemSpacing preference and shows a live preview before you apply changes.
- Read the current menu bar spacing (custom or system default)
- Adjust spacing with a slider and live preview
- Apply a new spacing value
- Reset back to macOS default
- Optional logout prompt so changes take effect immediately
MenuBarSpacer uses the macOS defaults system to read/write the NSStatusItemSpacing key in the current host’s global domain. This setting only takes effect after you log out and back in.
- Open
MenuBarSpacer.xcodeprojin Xcode. - Select the
MenuBarSpacertarget. - Build and run (⌘R).
- Launch the app.
- Set the desired spacing with the slider.
- Click Apply.
- Log out and back in to see the change.
To revert to the system default spacing, click Reset to macOS Default.
- A spacing of
0may cause menu bar items to overlap. - Large spacing values can push items off-screen.
- Changes apply per-host (current machine) and require logout/login.
MenuBarSpacer/ContentView.swift— main UI and actionsMenuBarSpacer/SpacingManager.swift— reads/writesNSStatusItemSpacingMenuBarSpacer/MenuBarSimulatorView.swift— menu bar preview
Xcode unit and UI test targets are included:
MenuBarSpacerTestsMenuBarSpacerUITests
Issues and PRs are welcome. If you add new features, include a short description and any relevant tests.