Sane defaults for macOS


I love macOS. My job revolves around it, I write about it on this site and I have been using it for about 20 years with no major complaint. Hell, this domain starts with the word “mac”.

However some of the behaviours in the UI that I have been used to over the years are not set by defaults. It would drive me mental not having these.

As most of my post, this is for my own documentation, but in the spirit of sharing I hope that this might help someone out there.

First things first…


This section – strictly speaking – does not talk about macOS defaults. But I absolutely need these tools to be able to set up my Mac fast, comfortably and properly.

  • Homebrew: Command line package manager for macOS. I install most of my programs with it. How to install it is described on the homepage.
  • dockutil: Command line utility for managing Mac OS X dock items. Installed via homebrew.
  • mysides: Command line tool for Finder sidebar modification. Installed via homebrew as well.

Changing settings

Personally I have scripted these settings to be done automatically. Some snippets are stolen of course 😎. For this post however I ll mention the settings over the GUI as well.

Finder & Desktop

This are the settings you can change over the Finder preferences (⌘ + ,) or the view options (⌘ + j).

  • Always show file suffixes: macOS does not need this to know the file type, but I do. The icon previews are by far not enough.
  • Always search the current folder: For global search on disk I user either Spotlight or
  • Show the path bar and the status bar: This is quite spiffy since it provides the location in the Finder and the available space on disk at a glance. Plus I prefer the aesthetics.
  • Visible devices in the sidebar: I like to see both hard disks, removable devices and servers in my sidebar for quicker access.
  • Items to display on the desktop: To maximise the quick access I want to all manner of volumes on my desktop as well.
  • Open new Finder windows showing the home directory: This might just be a matter of taste.
  • Open new Finder windows in list view: The default, which is the icon view drives me up the walls.

In addition to the GUI, these settings can be changed with a simple bash script. This is the corresponding snippet of the script.

# Always show suffixes
defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# Always search current folder
defaults write FXDefaultSearchScope -string "SCcf"

# Show path bar and status bar
defaults write ShowStatusBar -bool true
defaults write ShowPathbar -bool true

# Devices for the sidebar
defaults write systemitems -dict-add ShowServers -int 1
defaults write systemitems -dict-add ShowRemovable -int 1
defaults write systemitems -dict-add ShowHardDisks -int 1
defaults write systemitems -dict-add ShowEjectables -int 1

# Items to display on the desktop
defaults write ShowHardDrivesOnDesktop -int 1
defaults write ShowMountedServersOnDesktop -int 1
defaults write ShowExternalHardDrivesOnDesktop -int 1
defaults write ShowRemovableMediaOnDesktop -int 1

# Open home in new window
defaults write NewWindowTarget -string "PfLo"
defaults write NewWindowTargetPath -string "'file://$HOME/"

# List view in by default
# Possible: `icnv`, `clmv`, `Flwv`
defaults write FXPreferredViewStyle -string "Nlsv"

# Show the ~/Library folder
chflags nohidden ~/Library


I general, there is not much to the But a few fixes/adjustments go a long way as a matter of quality of life. Most of these settings are accessible through the System or a simple drag and drop.

  • Remove everything from the dock: I keep the following items in the beginning and add others as I go:
    • App
    • System
  • Automatically hide and show the Dock: Since I work quite a lot on the MacBook I take all the real estate of the screen that I can get. However for this change not to drive me nuts, I need the popup of the hidden Dock to be significantly faster than the default settings. This is unfortunately this is only possible via the command line.

The complete snippet for the Dock settings:

# Dock: Make it popup faster
defaults write autohide-delay -float 0
defaults write autohide-time-modifier -float 0

# Automatically hide and show the Dock
defaults write autohide -int 1

# Remove everything
dockutil --remove all > /dev/null 2>&1

# Minimal setup
dockutil --add /Applications/ > /dev/null 2>&1
dockutil --add /System/Applications/App\ > /dev/null 2>&1
dockutil --add /System/Applications/ > /dev/null 2>&1
dockutil --add /System/Applications/System\ > /dev/null 2>&1
dockutil --add /Applications/ > /dev/null 2>&1
dockutil --add /Applications/ > /dev/null 2>&1

General UI behaviour

  • Scroll bars visibility: For a few macOS versions now the scroll bar has been reasonably discrete and small enough, which is why I like it to be always around.
  • Right click for magic mouse: God knows why this is not the defaults behaviour.
  • Tap and Two-Finger-Tap for the trackpad: I can’t really say when I use a click or tap on the trackpad, but I need the right click with the two-finger-tap for sure.
  • Much faster keyboard key repeat: This is of at most importance for navigating through text. For the speed I need the settings in the GUI isn’t not enough. I change this in a script.
  • Turn off auto correct & auto capitalize: This would be otherwise annoying to no end.
  • Different spaces for different displays: Probably a matter of taste again.
  • Do not automatically rearrange Spaces based on most recent use: I like to know where all my windows are and don’t want macOS to reorder this automatically.
  • Hot corners: I can’t work without these. I Use them to access the desktop, call up Exposé and start the screensaver which also locks the Mac straight away.

Here is how I implement the settings in a script:

# Scroll bars
# Possible: "WhenScrolling", "Automatic" and "Always"
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"

# Right click for magic mouse
defaults write MouseButtonMode -string TwoButton

# System Preferences: Trackpad
# Trackpad: Tap
defaults write Clicking -bool true
defaults write Clicking -bool true
defaults -currentHost write NSGlobalDomain -int 1
defaults write NSGlobalDomain -int 1
# Trackpad: Two-Finger-Tap
defaults write TrackpadRightClick -bool true
defaults write TrackpadRightClick -bool true
defaults -currentHost write NSGlobalDomain -bool true
defaults write TrackpadRightClick -bool true

# Keyboard key repeat
defaults write -g InitialKeyRepeat -int 10
defaults write -g KeyRepeat -int 1

# Auto correct off & Auto capitalize off
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false

# Different spaces for different displays
defaults write spans-displays -int 0
# Don’t automatically rearrange Spaces based on most recent use
defaults write mru-spaces -int 0

# Hot corners
# Possible values: 0 no-op; 2 Mission Control; 3 Show application windows;
# 4 Desktop; 5 Start screen saver; 6 Disable screen saver; 7 Dashboard;
# 10 Put display to sleep; 11 Launchpad; 12 Notification Center
defaults write wvous-tl-corner -int 3
defaults write wvous-tl-modifier -int 0

defaults write wvous-tr-corner -int 4
defaults write wvous-tr-modifier -int 0

defaults write wvous-bl-corner -int 2
defaults write wvous-bl-modifier -int 0

defaults write wvous-br-corner -int 5
defaults write wvous-br-modifier -int 0