Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Terminal: Defaults Write
# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
###############################################################################
# Screen #
###############################################################################
# Save screenshots to the desktop
defaults write com.apple.screencapture location -string "$HOME/Desktop"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Enable subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2
###############################################################################
# Dock & hot corners #
###############################################################################
# Show indicator lights for open applications in the Dock
defaults write com.apple.dock show-process-indicators -bool true
# Enable the 2D Dock
defaults write com.apple.dock no-glass -bool true
# Add a spacer to the left side of the Dock (where the applications are)
#defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
# Add a spacer to the right side of the Dock (where the Trash is)
#defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'
###############################################################################
# Additional #
###############################################################################
# Don't write .DS_store on network shares
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
defaults write NSGlobalDomain AppleFontSmoothing -int 2
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
defaults write com.apple.finder _FXShowPosixPathInTitle 1
defaults write com.apple.LaunchServices LSQuarantine -bool NO
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
# Always show expanded save dialogs
defaults write -g NSNavPanelExpandedStateForSaveMode -bool YES
# Show item info near icons on the desktop
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
# Show item info to the right of the icons on the desktop
/usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist
# Enable snap-to-grid for icons on the desktop
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
# Empty Trash securely by default
defaults write com.apple.finder EmptyTrashSecurely -bool true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment