Friendly OS X defaults
Over the years I’ve discovered an array of OS X defaults that make my life easier and performing tasks quicker. One of the reasons I learnt Vim was because I was using my mouse far too much for repetitive tasks.
You should know what you’re doing when using the Terminal. If you use iTerm I imagine you have a pretty good idea. Don’t blame me when you break something 👊.
Developer happiness
Faster keyboard response
defaults write NSGlobalDomain KeyRepeat -int 0.02
Reduced key repeat delay
defaults write NSGlobalDomain InitialKeyRepeat -int 12
UTF-8 Terminal happiness
defaults write com.apple.terminal StringEncodings -array 4
Protect your code
This might not be a developer friendly default, but you can keep your code secure when your screensaver starts and you have to leave your hot desk.
defaults write com.apple.screensaver askForPassword -int 1defaults write com.apple.screensaver askForPasswordDelay -int 0
Overall nice-to-haves
These aren’t developer specific but really helpful. 💯
Silence your boot chime
Don’t wake your fiancée when you’re working late. Silence that boot chime.
sudo nvram SystemAudioVolume=” “
Increase the Dock show/hide speed
If you have to use the Dock, speed up the time it animates in and out.
defaults write com.apple.dock autohide -bool truedefaults write com.apple.dock autohide-time-modifier -float 0.5killall Dock
Save/Print Modals
Expanding the Save and Print modals in OS X is a repetitive task and is something you can set to always show if you know how to.
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool truedefaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
Return of ~/Library
Maybe you’re a frequent visitor of the ~/Library folder. I always forget the ALT shortcut when in Finder to show ~/Library.
chflags nohidden ~/Library
Create prettier screenshots in OS X
Screenshots come with a shadow effect by default. You can remove it.
defaults write com.apple.screencapture disable-shadow -bool true
Disable Notification Center
You can easily disable Notification Center in newer versions of Mac OS, along with removing the icon from the status bar by executing the following.
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist killall NotificationCenter
‘Are you sure you want to open this application?’
Open an application from the web without being asked if that’s what you really want to do.
defaults write com.apple.LaunchServices LSQuarantine -bool false
Alternatively, you might want to allow apps downloaded from “Anywhere” allowed to be opened.
sudo spctl — master-disable
Disable Time Machine annoying dialogs
You’ll store your documents and photos in iCloud, your code on GitHub and your music on Spotify. Time Machine doesn’t need to ask you if you want to use any storage devices as a backup drive.
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
Applying the changes
To make any of these work, you’ll need to use Terminal and execute the following command after to apply the changes. You’ll need to reboot if you selected to get rid of Notifications Center.
killall Finder
If you’ve got any other Mac OS X defaults, please leave a comment or reach out on Twitter. Have a nice day 👌.