1
0
mirror of https://github.com/kremalicious/dotfiles.git synced 2024-11-22 09:47:21 +01:00
dotfiles/osx

148 lines
6.8 KiB
Plaintext
Raw Normal View History

2012-06-18 01:10:31 +02:00
# OS X defaults
#
# most of it taken from @mathiasbynens
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
########################################################################
2014-06-16 11:01:17 +02:00
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
2012-11-27 16:38:54 +01:00
###############################################################################
# General UI/UX #
###############################################################################
2012-06-18 01:10:31 +02:00
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Disable automatic termination of inactive apps
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
2012-11-27 16:38:54 +01:00
###############################################################################
# Trackpad, mouse, keyboard, and input #
###############################################################################
2012-06-18 01:10:31 +02:00
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
###############################################################################
# Finder #
###############################################################################
2012-11-27 16:38:54 +01:00
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
2012-06-18 01:10:31 +02:00
# Allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
2012-06-18 01:10:31 +02:00
# Disable disk image verification
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
2014-06-16 11:01:17 +02:00
# Enable snap-to-grid for icons on the desktop and in other icon views
2012-06-18 01:10:31 +02:00
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
2014-06-16 11:01:17 +02:00
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
2012-06-18 01:10:31 +02:00
# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Empty Trash securely by default
2012-11-27 16:38:54 +01:00
defaults write com.apple.finder EmptyTrashSecurely -bool true
2012-06-18 01:10:31 +02:00
# Show the ~/Library folder
chflags nohidden ~/Library
2012-11-27 16:38:54 +01:00
###############################################################################
2014-06-16 11:01:17 +02:00
# Dock, Dashboard, and hot corners #
###############################################################################
2012-06-18 01:10:31 +02:00
# Show indicator lights for open applications in the Dock
defaults write com.apple.dock show-process-indicators -bool true
2014-06-16 11:01:17 +02:00
# Speed up Mission Control animations
defaults write com.apple.dock expose-animation-duration -float 0.1
# Dont automatically rearrange Spaces based on most recent use
defaults write com.apple.dock mru-spaces -bool false
2012-06-18 01:10:31 +02:00
# 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";}'
2012-11-27 16:38:54 +01:00
###############################################################################
# Safari & WebKit #
###############################################################################
2014-06-16 11:01:17 +02:00
# Set Safaris home page to `about:blank` for faster loading
defaults write com.apple.Safari HomePage -string "about:blank"
2012-11-27 16:38:54 +01:00
# Allow hitting the Backspace key to go to the previous page in history
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true
2012-06-18 01:10:31 +02:00
# Enable Safaris debug menu
2014-06-16 11:01:17 +02:00
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
# Enable the Develop menu and the Web Inspector in Safari
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
2012-06-18 01:10:31 +02:00
# Make Safaris search banners default to Contains instead of Starts With
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
# Set web style sheet
2014-06-16 11:01:17 +02:00
defaults write com.apple.Safari UserStyleSheetEnabled -bool true
defaults write com.apple.Safari UserStyleSheetLocationURLString -string "~/Projects/dotfiles/webstyle.css"
defaults write com.apple.Safari WebKitUserStyleSheetLocationPreferenceKey -string "~/Projects/webstyle.css"
2012-11-27 16:38:54 +01:00
###############################################################################
2014-06-16 11:01:17 +02:00
# Mail #
###############################################################################
2012-06-18 01:10:31 +02:00
# Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
2012-11-27 16:38:54 +01:00
2014-06-16 11:01:17 +02:00
###############################################################################
# Terminal #
###############################################################################
# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4
2012-11-27 16:38:54 +01:00
###############################################################################
# Time Machine #
###############################################################################
# Prevent Time Machine from prompting to use new hard drives as backup volume
2012-07-04 04:10:04 +02:00
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Disable local Time Machine backups
2014-06-16 11:01:17 +02:00
hash tmutil &> /dev/null && sudo tmutil disablelocal
###############################################################################
# GPGMail 2 #
###############################################################################
# Disable signing emails by default
defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false