Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 192 lines (132 sloc) 7.879 kB
347ac0f @sjl moar
authored
1 #!/usr/bin/env bash
2
8735845 @sjl Add osx.sh.
authored
3 # Disable menu bar transparency
4 defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
5
6 # Show remaining battery time; hide percentage
7 defaults write com.apple.menuextra.battery ShowPercent -string "NO"
8 defaults write com.apple.menuextra.battery ShowTime -string "NO"
9
10 # Always show scrollbars
11 # defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
12
13 # Expand save panel by default
14 defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
15
16 # Expand print panel by default
17 defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
18
19 # Disable the “Are you sure you want to open this application?” dialog
20 # defaults write com.apple.LaunchServices LSQuarantine -bool false
21
22 # Display ASCII control characters using caret notation in standard text views
23 # Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`
24 defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
25
26 # Disable opening and closing window animations
27 defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
28
29 # Increase window resize speed for Cocoa applications
30 defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
31
32 # Disable Resume system-wide
33 defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
34
35 # Disable the “reopen windows when logging back in” option
36 # This works, although the checkbox will still appear to be checked,
37 # and the command needs to be entered again for every restart.
38 defaults write com.apple.loginwindow TALLogoutSavesState -bool false
39 defaults write com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false
40
41 # Fix for the ancient UTF-8 bug in QuickLook (http://mths.be/bbo)
42 # Commented out, as this is known to cause problems when saving files in Adobe Illustrator CS5 :(
43 #echo "0x08000100:0" > ~/.CFUserTextEncoding
44
45 # Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
46 defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
47
48 # Enable subpixel font rendering on non-Apple LCDs
49 defaults write NSGlobalDomain AppleFontSmoothing -int 2
50
51 # Disable press-and-hold for keys in favor of key repeat
52 defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
53
54 # Set a blazingly fast keyboard repeat rate
55 defaults write NSGlobalDomain KeyRepeat -int 0
56
57 # Disable auto-correct
58 defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
59
60 # Require password immediately after sleep or screen saver begins
61 defaults write com.apple.screensaver askForPassword -int 1
62 defaults write com.apple.screensaver askForPasswordDelay -int 0
63
64 # Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons
65 defaults write com.apple.finder QuitMenuItem -bool true
66
67 # Disable window animations and Get Info animations in Finder
68 defaults write com.apple.finder DisableAllAnimations -bool true
69
70 # Show all filename extensions in Finder
71 defaults write NSGlobalDomain AppleShowAllExtensions -bool true
72
73 # Show status bar in Finder
74 defaults write com.apple.finder ShowStatusBar -bool true
75
76 # Allow text selection in Quick Look
77 defaults write com.apple.finder QLEnableTextSelection -bool true
78
79 # Disable disk image verification
80 defaults write com.apple.frameworks.diskimages skip-verify -bool true
81 defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
82 defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
83
84 # Automatically open a new Finder window when a volume is mounted
85 defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
86 defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
87 defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
88
89 # Display full POSIX path as Finder window title
90 defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
91
92 # Avoid creating .DS_Store files on network volumes
93 defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
94
95 # Disable the warning when changing a file extension
96 defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
97
98 # Show item info below desktop icons
99 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
100
101 # Enable snap-to-grid for desktop icons
102 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy kind" ~/Library/Preferences/com.apple.finder.plist
103
104 # Disable the warning before emptying the Trash
105 defaults write com.apple.finder WarnOnEmptyTrash -bool false
106
107 # Empty Trash securely by default
108 defaults write com.apple.finder EmptyTrashSecurely -bool true
109
110 # Show the ~/Library folder
111 chflags nohidden ~/Library
112
113 # Enable highlight hover effect for the grid view of a stack (Dock)
114 defaults write com.apple.dock mouse-over-hilte-stack -bool true
115
116 # Enable spring loading for all Dock items
117 defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
118
119 # Show indicator lights for open applications in the Dock
120 defaults write com.apple.dock show-process-indicators -bool true
121
122 # Don’t animate opening applications from the Dock
123 defaults write com.apple.dock launchanim -bool false
124
125 # Remove the auto-hiding Dock delay
126 defaults write com.apple.Dock autohide-delay -float 10000
127
128 # Remove the animation when hiding/showing the Dock
129 defaults write com.apple.dock autohide-time-modifier -float 0
130
131 # Enable the 2D Dock
132 defaults write com.apple.dock no-glass -bool true
133
134 # Automatically hide and show the Dock
135 defaults write com.apple.dock autohide -bool true
136
137 # Make Dock icons of hidden applications translucent
138 defaults write com.apple.dock showhidden -bool true
139
140 # Enable iTunes track notifications in the Dock
141 defaults write com.apple.dock itunes-notifications -bool true
142
143 # Disable Safari’s thumbnail cache for History and Top Sites
144 defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
145
146 # Enable Safari’s debug menu
147 defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
148
149 # Make Safari’s search banners default to Contains instead of Starts With
150 defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
151
152 # Remove useless icons from Safari’s bookmarks bar
153 defaults write com.apple.Safari ProxiesInBookmarksBar "()"
154
155 # Add a context menu item for showing the Web Inspector in web views
156 defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
157
158 # Enable the debug menu in Address Book
159 defaults write com.apple.addressbook ABShowDebugMenu -bool true
160
161 # Enable the debug menu in iCal
162 defaults write com.apple.iCal IncludeDebugMenu -bool true
163
164 # Only use UTF-8 in Terminal.app
165 defaults write com.apple.terminal StringEncodings -array 4
166
167 # Disable the Ping sidebar in iTunes
168 defaults write com.apple.iTunes disablePingSidebar -bool true
169
170 # Disable all the other Ping stuff in iTunes
171 defaults write com.apple.iTunes disablePing -bool true
172
173 # Make ⌘ + F focus the search input in iTunes
174 defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
175
176 # Disable send and reply animations in Mail.app
177 defaults write com.apple.Mail DisableReplyAnimations -bool true
178 defaults write com.apple.Mail DisableSendAnimations -bool true
179
180 # Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
181 defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
182
183 # Reset Launchpad
184 [ -e ~/Library/Application\ Support/Dock/*.db ] && rm ~/Library/Application\ Support/Dock/*.db
185
186 # Prevent Time Machine from prompting to use new hard drives as backup volume
187 defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
188
189 # Kill affected applications
190 for app in Safari Finder Dock Mail SystemUIServer; do killall "$app" > /dev/null 2>&1; done
191 echo "Done. Note that some of these changes require a logout/restart to take effect."
Something went wrong with that request. Please try again.