Useful macOS defaults: Finder
com.apple.finder controls how Finder looks and behaves. Finder has more hidden settings than almost any other macOS app.
After changing most of these, restart Finder:
killall Finder
Show hidden files
Show files that start with a dot (like .gitignore, .zshrc, .env):
defaults write com.apple.finder AppleShowAllFiles -bool true
To hide them again:
defaults write com.apple.finder AppleShowAllFiles -bool false
You can also toggle this with the keyboard shortcut Command Shift Period.
Show the full path in the title bar
Display the folder path at the top of each Finder window:
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
To turn it off:
defaults write com.apple.finder _FXShowPosixPathInTitle -bool false
Show the path bar at the bottom
The path bar shows your current location as a clickable breadcrumb trail at the bottom of the window:
defaults write com.apple.finder ShowPathbar -bool true
Show the status bar
The status bar at the bottom shows how many items are in the current folder and how much disk space is free:
defaults write com.apple.finder ShowStatusBar -bool true
Set the default view style
Finder can show files as icons, a list, columns, or a gallery. Set the default:
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
The codes are:
icnv= icon viewNlsv= list viewclmv= column viewglyv= gallery view
Set the default folder for new windows
When you open a new Finder window, it shows a default folder. To change it:
defaults write com.apple.finder NewWindowTarget -string "PfLo"
defaults write com.apple.finder NewWindowTargetPath -string "file:///Users/yourname/Documents/"
Common values for NewWindowTarget:
PfDe= DesktopPfDo= DocumentsPfHm= Home folderPfLo= a custom path (set inNewWindowTargetPath)PfVo= the computer (shows all drives)
Search the current folder by default
When you type in the Finder search box, macOS searches your whole Mac by default. To search only the current folder:
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
Other options:
SCev= search the whole MacSCcf= search the current folderSCsp= use the previous search scope
Turn off the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
Turn off the warning when emptying the Bin
defaults write com.apple.finder WarnOnEmptyTrash -bool false
Show drives on the desktop
Show hard drives, external drives, and servers on the desktop:
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
Set any of these to false to hide them.
Keep folders on top when sorting by name
Put folders before files in list view:
defaults write com.apple.finder _FXSortFoldersFirst -bool true
Keep folders on top on the Desktop too
defaults write com.apple.finder _FXSortFoldersFirstOnDesktop -bool true
Disable window animations
Turn off the animation when opening a new Finder window or Quick Look:
defaults write com.apple.finder DisableAllAnimations -bool true
Spring-loaded folders
When you drag a file over a folder and hold, the folder opens after a short delay. Set the delay in seconds:
defaults write NSGlobalDomain com.apple.springing.delay -float 0.5
The default is about 0.5 seconds. Set it lower for faster opening.
Turn spring-loaded folders on or off:
defaults write NSGlobalDomain com.apple.springing.enabled -bool true
Show the Library folder
The ~/Library folder is hidden by default. To show it in Finder:
chflags nohidden ~/Library
This is not a defaults command but fits well here. To hide it again:
chflags hidden ~/Library
Avoid creating .DS_Store files on network and USB drives
This lives in a different domain but is closely tied to Finder behaviour:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
Read all current Finder settings
defaults read com.apple.finder
This shows every Finder preference, including ones you have not changed. It is useful for finding settings not listed here.
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:
Tags:
Year: