Skip to content

Instantly share code, notes, and snippets.

Forked from meleyal/
Last active Aug 29, 2015
What would you like to do?
# OSX defaults, based on
# Ask for the administrator password upfront
sudo -v
# Set computer name (as done via System Preferences → Sharing)
sudo scutil --set ComputerName "featherstonehaugh"
sudo scutil --set HostName "featherstonehaugh"
sudo scutil --set LocalHostName "featherstonehaugh"
sudo defaults write /Library/Preferences/SystemConfiguration/ NetBIOSName -string "featherstonehaugh"
# Disable crash reports. I know python crashed, I exited with ctrl-|
defaults write DialogType none
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Menu bar: hide the useless Time Machine and Volume icons
defaults write menuExtras -array "/System/Library/CoreServices/Menu Extras/" "/System/Library/CoreServices/Menu Extras/" "/System/Library/CoreServices/Menu Extras/" "/System/Library/CoreServices/Menu Extras/"
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write LSQuarantine -bool false
# Disable Notification Center and remove the menu bar icon
# Doesn't seem to work on Mavericks
#launchctl unload -w /System/Library/LaunchAgents/
# Trackpad: enable tap to click for this user and for the login screen
defaults write Clicking -bool true
defaults -currentHost write NSGlobalDomain -int 1
defaults write NSGlobalDomain -int 1
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Require password immediately after sleep or screen saver begins
defaults write askForPassword -int 1
defaults write askForPasswordDelay -int 0
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# When performing a search, search the current folder by default
defaults write FXDefaultSearchScope -string "SCcf"
# Disable the warning when changing a file extension
defaults write FXEnableExtensionChangeWarning -bool false
# Enable snap-to-grid for icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/
# Set the icon size of Dock items to 36 pixels
defaults write tilesize -int 36
# Wipe all (default) app icons from the Dock
# This is only really useful when setting up a new Mac, or if you don’t use
# the Dock to launch apps.
#defaults write persistent-apps -array
# Automatically hide and show the Dock
defaults write autohide -bool true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment