Useful macOS defaults: NSGlobalDomain

NSGlobalDomain holds settings that apply across the whole system. Every app reads from it. Changing a value here changes behaviour everywhere.

You can write to it using either NSGlobalDomain or the shorthand -g:

defaults write NSGlobalDomain KeyName -type value
defaults write -g KeyName -type value

After changing most of these, you need to log out and back in, or restart the affected app.

Keyboard and text

Show all file extensions in Finder and Open/Save dialogs:

defaults write NSGlobalDomain AppleShowAllExtensions -bool true

Turn off auto-correct:

defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

Turn off smart quotes and smart dashes (useful for developers):

defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false

Turn off automatic capitalisation:

defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false

Turn off adding a full stop with a double space:

defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false

Set a fast key repeat rate and a short delay before repeat starts. The values are in milliseconds. Lower means faster:

defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15

Appearance

Use dark mode:

defaults write NSGlobalDomain AppleInterfaceStyle -string "Dark"

Remove dark mode (go back to light):

defaults delete NSGlobalDomain AppleInterfaceStyle

Turn on subpixel font smoothing (useful on non-Retina external displays):

defaults write NSGlobalDomain AppleFontSmoothing -int 1

Reduce transparency across the system:

defaults write NSGlobalDomain AppleReduceDesktopTinting -bool true

Scrolling and trackpad

Always show scrollbars (instead of only when scrolling):

defaults write NSGlobalDomain AppleShowScrollBars -string "Always"

Other options are WhenScrolling and Automatic.

Use scroll direction where content follows your fingers (what Apple calls "natural"):

defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true

Set it to false for the older scroll direction.

Windows and sheets

Speed up window resize animations:

defaults write NSGlobalDomain NSWindowResizeTime -float 0.1

The default is about 0.2 seconds.

Make sheets (the drop-down dialogs) appear faster:

defaults write NSGlobalDomain NSWindowResizeTime -float 0.001

Expand the save panel by default (so you see the full file browser, not the small version):

defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true

Expand the print panel by default:

defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true

How to read a value

defaults read NSGlobalDomain KeyRepeat

How to reset a value to its default

defaults delete NSGlobalDomain KeyRepeat

This removes your override and lets macOS use its built-in default.


Enjoyed this post?

Well, you could share the post with others, follow me with RSS Feeds and/or send me a comment via email.


Tags

Category:

Year: