Adjusting Spacing Between Icons in the macOS Menubar

The number of icons in the macOS menubar (to the left of the clock in the upper-right corner) can be quite large, especially in the presence of the notch. While you can use something like Bartender (Update 6/2024: Looks like Bartender was bought and the new owner may be shady. Some alternatives that I've not used include Ice, Hidden Bar or Dozer.) to wrangle these, I find it works as well just to reduce the spacing between icons so more can fit.

First, you can check whether you've already set some custom values:

defaults -currentHost read -globalDomain NSStatusItemSpacing
defaults -currentHost read -globalDomain NSStatusItemSelectionPadding

These will likely error if you've never set them.

You can tweak these values with these calls, modifying the value as desired:

defaults -currentHost write -globalDomain NSStatusItemSpacing -int 12
defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 8

Log out and back in to see the results.

To restore the values to default, delete the custom settings:

defaults -currentHost delete -globalDomain NSStatusItemSpacing
defaults -currentHost delete -globalDomain NSStatusItemSelectionPadding

Log out and back in again.

I've tested this only on macOS 14, Sonoma.


Home | Back to blog

This work is licensed under CC BY-NC 4.0 Creative Commons BY-NC image