Apple’s macOS operating system is renowned for its clean graphical interface, but many advanced configuration parameters are intentionally hidden from the System Settings application. Beneath the GUI, macOS stores user preferences, window behaviors, animation speeds, and application defaults inside structured property list files managed by the cfprefsd daemon. The built-in defaults command provides direct read/write access to this preference database, allowing users to customize Dock animations, expose hidden Finder files, and streamline desktop workflows.
Understanding domains and plist keys in defaults
Every application and operating system subsystem owns a unique domain (usually structured in reverse-DNS format, such as com.apple.dock or com.apple.finder). Within each domain, configurations are stored as typed key-value pairs (boolean, integer, float, or string).
# Read all active Dock preferences
defaults read com.apple.dock
# Query a specific preference key
defaults read com.apple.dock autohide
| Target Domain | Key Name | Data Type | Customization Impact |
|---|---|---|---|
com.apple.dock |
autohide-delay |
Float | Eliminates mouse hover lag before Dock reveals itself. |
com.apple.dock |
autohide-time-modifier |
Float | Accelerates the sliding animation speed of the Dock. |
com.apple.finder |
AppleShowAllFiles |
Boolean | Reveals hidden Unix files (dotfiles) across all Finder windows. |
com.apple.screencapture |
type |
String | Changes screenshot format from PNG to JPG, PDF, or TIFF. |
Speeding Up the macOS Dock Autohide Animation
By default, when the Dock is set to automatically hide, macOS introduces an intentional delay before the Dock slides up, followed by a slow slide animation. You can make the Dock appear instantaneously:
# Remove the hover delay before the Dock appears
defaults write com.apple.dock autohide-delay -float 0
# Accelerate the slide-in animation duration
defaults write com.apple.dock autohide-time-modifier -float 0.15
# Restart the Dock daemon to apply changes immediately
killall Dock
To restore default Dock animations at any time:
defaults delete com.apple.dock autohide-delay
defaults delete com.apple.dock autohide-time-modifier
killall Dock
Configuring Finder to Always Show Hidden Files and Path Bars
For developers who frequently inspect configuration files (such as .zshrc, .git, or .ssh):
# Show hidden dotfiles in Finder
defaults write com.apple.finder AppleShowAllFiles -bool true
# Show the interactive path breadcrumb bar at the bottom of Finder
defaults write com.apple.finder ShowPathbar -bool true
# Restart Finder to apply changes
killall Finder
Customizing Screenshot Formats and Destination Folders
By default, macOS saves uncompressed PNG screenshots to your desktop. You can redirect them to a dedicated directory and convert them to lightweight JPEG format:
# Change screenshot file format to JPG
defaults write com.apple.screencapture type -string "jpg"
# Set a dedicated folder for screenshots (e.g., ~/Pictures/Screenshots)
mkdir -p ~/Pictures/Screenshots
defaults write com.apple.screencapture location -string "$HOME/Pictures/Screenshots"
# Restart the SystemUIServer daemon
killall SystemUIServer
Using the defaults command allows macOS power users to tailor the operating system for maximum speed, efficiency, and developer productivity.