Last active
February 8, 2016 00:04
-
-
Save jeromedalbert/389f16019a318b478774 to your computer and use it in GitHub Desktop.
Configure OSX Yosemite with sensible defaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable the "Are you sure you want to open this application?" dialog | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
# Disable press-and-hold for keys in favor of key repeat | |
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
# Set a fast keyboard repeat rate | |
defaults write NSGlobalDomain KeyRepeat -int 2 | |
# Decrease the initial time before a keyboard repeat | |
defaults write -g InitialKeyRepeat -int 15 | |
# Disable auto-correct | |
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false | |
# Require password immediately after sleep or screen saver begins | |
defaults write com.apple.screensaver askForPassword -int 1 | |
defaults write com.apple.screensaver askForPasswordDelay -int 0 | |
# Set Home as the default location for new Finder windows | |
defaults write com.apple.finder NewWindowTarget -string "PfHm" | |
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/" | |
# Show all filename extensions in Finder | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
# Show status bar in Finder | |
defaults write com.apple.finder ShowStatusBar -bool true | |
# When performing a search, search the current folder by default | |
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
# Use list view in all Finder windows by default | |
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" | |
# Disable the warning when changing a file extension | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false | |
# Hot corners | |
# Top right screen corner → Desktop | |
defaults write com.apple.dock wvous-tr-corner -int 4 | |
defaults write com.apple.dock wvous-tr-modifier -int 0 | |
# Automatically hide and show the Dock | |
defaults write com.apple.dock autohide -bool true | |
# Disable "natural" (Lion-style) scrolling | |
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false | |
# Enable full keyboard access for all controls | |
# (e.g. enable Tab in modal dialogs) | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 2 | |
# Use scroll gesture with the Ctrl (^) modifier key to zoom | |
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true | |
# Set the icon size of Dock items in pixels | |
defaults write com.apple.dock tilesize -int 61 | |
# Disable Dashboard | |
defaults write com.apple.dashboard mcx-disabled -bool true | |
# Don’t show Dashboard as a Space | |
defaults write com.apple.dock dashboard-in-overlay -bool true | |
# Show battery percentage | |
defaults write com.apple.menuextra.battery ShowPercent -string "YES" | |
# Configure Spotlight search sources | |
# Yosemite-specific search results (remove them if your are using OS X 10.9 or older) are: | |
# MENU_DEFINITION | |
# MENU_CONVERSION | |
# MENU_EXPRESSION | |
# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) | |
# MENU_WEBSEARCH (send search queries to Apple) | |
# MENU_OTHER | |
defaults write com.apple.spotlight orderedItems -array \ | |
'{"enabled" = 1;"name" = "APPLICATIONS";}' \ | |
'{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ | |
'{"enabled" = 1;"name" = "DIRECTORIES";}' \ | |
'{"enabled" = 0;"name" = "PDF";}' \ | |
'{"enabled" = 0;"name" = "FONTS";}' \ | |
'{"enabled" = 1;"name" = "DOCUMENTS";}' \ | |
'{"enabled" = 0;"name" = "MESSAGES";}' \ | |
'{"enabled" = 0;"name" = "CONTACT";}' \ | |
'{"enabled" = 0;"name" = "EVENT_TODO";}' \ | |
'{"enabled" = 0;"name" = "IMAGES";}' \ | |
'{"enabled" = 0;"name" = "BOOKMARKS";}' \ | |
'{"enabled" = 0;"name" = "MUSIC";}' \ | |
'{"enabled" = 0;"name" = "MOVIES";}' \ | |
'{"enabled" = 0;"name" = "PRESENTATIONS";}' \ | |
'{"enabled" = 0;"name" = "SPREADSHEETS";}' \ | |
'{"enabled" = 0;"name" = "SOURCE";}' \ | |
'{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ | |
'{"enabled" = 0;"name" = "MENU_OTHER";}' \ | |
'{"enabled" = 1;"name" = "MENU_CONVERSION";}' \ | |
'{"enabled" = 1;"name" = "MENU_EXPRESSION";}' \ | |
'{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ | |
'{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' | |
# Load new settings before rebuilding the index | |
killall mds > /dev/null 2>&1 | |
# Prevent Time Machine from prompting to use new hard drives as backup volume | |
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true | |
# Disable the all too sensitive backswipe in Chrome | |
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false | |
############################################################################### | |
# Kill affected applications # | |
############################################################################### | |
for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \ | |
"Dock" "Finder" "Mail" "Messages" "Safari" "SizeUp" "SystemUIServer" \ | |
"Terminal" "Transmission" "Twitter" "iCal"; do | |
killall "${app}" > /dev/null 2>&1 | |
done | |
echo "Done. Note that some of these changes require a logout/restart to take effect." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment