DEV Community

loading...
Cover image for Friendly OS X defaults

Friendly OS X defaults

Jamie Barton
Husband. Dad. Full Stack Developer.
Originally published at notrab.dev Updated on ・2 min read

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. Don’t blame me when you break something 👊.

Developer happiness

Faster keyboard response

defaults write NSGlobalDomain KeyRepeat -int 0.02
Enter fullscreen mode Exit fullscreen mode

Reduced key repeat delay

defaults write NSGlobalDomain InitialKeyRepeat -int 12
Enter fullscreen mode Exit fullscreen mode

UTF-8 Terminal happiness

defaults write com.apple.terminal StringEncodings -array 4
Enter fullscreen mode Exit fullscreen mode

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 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
Enter fullscreen mode Exit fullscreen mode

Overall nice-to-haves

These aren't developer specific but really helpful. 💯

Silence your boot chime

sudo nvram SystemAudioVolume=" "
Enter fullscreen mode Exit fullscreen mode

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 true
defaults write com.apple.dock autohide-time-modifier -float 0.5
killall Dock
Enter fullscreen mode Exit fullscreen mode

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 true

defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Create prettier screenshots in OS X

Window captures come with a shadow effect by default. You can remove it.

defaults write com.apple.screencapture disable-shadow -bool true
Enter fullscreen mode Exit fullscreen mode

'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
Enter fullscreen mode Exit fullscreen mode

Alternatively, you might want to allow apps downloaded from "Anywhere" allowed to be opened.

sudo spctl - master-disable
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

If you've got any other Mac OS X defaults, please leave a comment to share with others. 👌

Discussion (0)