Useful macOS Defaults and Settings

Here are a few defaults settings and macOS configurations I like to use when setting up a new Mac.

TextEdit: Open New Document Instead of File Picker

By default, launching TextEdit displays an app-centric iCloud document selection panel. To force TextEdit to bypass this and open a new untitled document instead:

defaults write com.apple.TextEdit NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool false

Adjusting Menubar Icon Spacing

The spacing between menubar icons in macOS can be quite wide, taking up valuable screen real estate (especially on MacBooks with a notch). You can reduce the spacing between icons so more fit:

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

Log out and back in for the changes to take effect.

To check the current values or restore the default spacing:

# Read current values
defaults -currentHost read -globalDomain NSStatusItemSpacing
defaults -currentHost read -globalDomain NSStatusItemSelectionPadding

# Reset to defaults
defaults -currentHost delete -globalDomain NSStatusItemSpacing
defaults -currentHost delete -globalDomain NSStatusItemSelectionPadding

Making macOS Accept a Copied Plist File

When copying a .plist preferences file from one Mac to another, the cfprefsd preferences caching daemon may overwrite the copied file with defaults upon launching the application. To force cfprefsd to re-read the replaced file:

defaults read [plist file]

Home | Back to Misc Code & Software

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