Skip to content

Instantly share code, notes, and snippets.

@brentley
Created September 14, 2016 15:44
Show Gist options
  • Save brentley/d4c53f28ead2a73c530ff9eb76df482c to your computer and use it in GitHub Desktop.
Save brentley/d4c53f28ead2a73c530ff9eb76df482c to your computer and use it in GitHub Desktop.
# Sets reasonable OS X defaults.
#
# Or, in other words, set shit how I like in OS X.
#
# The original idea (and a couple settings) were grabbed from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Run ./set-defaults.sh and you'll be good to go.
# Enable crontab processing (according to https://coderwall.com/p/ry9jwg)
[ ! -f /etc/crontab ] && sudo touch /etc/crontab
# Disable Dashboard (who uses that anyway?)
defaults write com.apple.dashboard mcx-disabled -boolean YES
# Disable press-and-hold for keys in favor of key repeat.
defaults write -g ApplePressAndHoldEnabled -bool false
# Use AirDrop over every interface. srsly this should be a default.
defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
# Always open everything in Finder's list view. This is important.
defaults write com.apple.Finder FXPreferredViewStyle Nlsv
# Show the ~/Library folder.
chflags nohidden ~/Library
# Set a really fast key repeat.
defaults write NSGlobalDomain KeyRepeat -int 0
# Set the Finder prefs for showing a few different volumes on the Desktop.
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
# Run the screensaver if we're in the bottom-left hot corner.
defaults write com.apple.dock wvous-bl-corner -int 5
defaults write com.apple.dock wvous-bl-modifier -int 0
# remove the doc autohide delay
defaults write com.apple.Dock autohide-delay -float 0
# remove the mission control delay
defaults write com.apple.dock expose-animation-duration -float 0.12
# make hidden apps translucent in the dock
defaults write com.apple.Dock showhidden -bool YES
# enable text selection in quick look
defaults write com.apple.finder QLEnableTextSelection -bool TRUE
# never show hidden files in the finder
defaults write com.apple.finder AppleShowAllFiles -bool NO
# show system info at the login screen
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
# set screen flash on beep
defaults write com.apple.systemsound com.apple.sound.beep.flash -int 1
# enable ssh logins
systemsetup -setremotelogin on &>/dev/null
# enable ntp
systemsetup -setusingnetworktime on &>/dev/null
# restart on power failure
systemsetup -setrestartpowerfailure on &>/dev/null
# restart on freeze
systemsetup -setrestartfreeze on &>/dev/null
# Hide Safari's bookmark bar.
defaults write com.apple.Safari ShowFavoritesBar -bool false
# Set up Safari for development.
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# Disable just smart dashes
defaults write -g NSAutomaticDashSubstitutionEnabled 0
# Disable just smart quotes
defaults write -g NSAutomaticQuoteSubstitutionEnabled 0
# To re-enable, set either back to 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment