Skip to content

Instantly share code, notes, and snippets.

@gaza3g
Forked from DAddYE/hack.sh
Last active April 29, 2018 02:28
Show Gist options
  • Save gaza3g/7851ac8a631b64810401c25d6c141652 to your computer and use it in GitHub Desktop.
Save gaza3g/7851ac8a631b64810401c25d6c141652 to your computer and use it in GitHub Desktop.
OSX For Hackers
#!/usr/bin/env sh
echo "Always show scrollbars"
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
echo "Show all filename extensions in Finder"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
echo "Remove slow animations when holding shift"
defaults write NSGlobalDomain FXEnableSlowAnimation -bool false
echo "Expand save panel by default"
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
echo "Expand print panel by default"
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
echo "Disable press-and-hold for keys in favor of key repeat"
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
echo "Set a shorter Delay until key repeat"
defaults write NSGlobalDomain InitialKeyRepeat -int 18
echo "Disable auto-correct"
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
echo "Disable opening and closing window animations"
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
echo "Add a context menu item for showing the Web Inspector in web views"
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
echo "Increase window resize speed for Cocoa applications"
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
echo "Disable window animations and Get Info animations in Finder"
defaults write com.apple.finder DisableAllAnimations -bool true
echo "Use current directory as default search scope in Finder"
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
echo "Show Path bar in Finder"
defaults write com.apple.finder ShowPathbar -bool true
echo "Show Status bar in Finder"
defaults write com.apple.finder ShowStatusBar -bool true
echo "Allow text selection in Quick Look"
defaults write com.apple.finder QLEnableTextSelection -bool true
echo "Display full POSIX path as Finder window title"
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
echo "Disable the warning when changing a file extension"
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
echo "Enable snap-to-grid for desktop icons"
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
echo "Disable the warning before emptying the Trash"
defaults write com.apple.finder WarnOnEmptyTrash -bool false
echo "Disable shadow in screenshots"
defaults write com.apple.screencapture disable-shadow -bool true
echo "Enable the 2D Dock"
defaults write com.apple.dock no-glass -bool true
echo "Automatically hide and show the Dock"
defaults write com.apple.dock autohide -bool true
echo "Make Dock icons of hidden applications translucent"
defaults write com.apple.dock showhidden -bool true
echo "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
echo "Avoid creating .DS_Store files on network volumes"
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
echo "Remove useless icons from Safari's bookmarks bar"
defaults write com.apple.Safari ProxiesInBookmarksBar "()"
echo "Show the ~/Library folder"
chflags nohidden ~/Library
echo "Prevent Time Machine from prompting to use new hard drives as backup volume"
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
echo "Kill affected applications"
for app in Safari Finder Dock Mail SystemUIServer; do
killall "$app" >/dev/null 2>&1
done
echo
echo "** \033[33mSome changes needs a reboot to take effect\033[0m **"
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment