Skip to content
This repository
Newer
Older
100755 324 lines (233 sloc) 14.762 kb
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
1 # ~/.osx — http://mths.be/osx
2
3 ###############################################################################
4 # General UI/UX #
5 ###############################################################################
6
7 # Menu bar: disable transparency
f1506922 »
2011-09-20 Use `NSGlobalDomain` instead of `-g`.
8 defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
7d022705 »
2011-09-05 Initial commit.
9
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
10 # Menu bar: show remaining battery time; hide percentage
91918d76 »
2011-09-23 Show remaining battery time; hide percentage.
11 defaults write com.apple.menuextra.battery ShowPercent -string "NO"
12 defaults write com.apple.menuextra.battery ShowTime -string "YES"
13
4e31acd0 »
2012-07-26 .osx: Hide the useless Time Machine and Volume icons
14 # Menu bar: hide the useless Time Machine and Volume icons
15 defaults write com.apple.systemuiserver menuExtras -array "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" "/System/Library/CoreServices/Menu Extras/AirPort.menu" "/System/Library/CoreServices/Menu Extras/Battery.menu" "/System/Library/CoreServices/Menu Extras/Clock.menu"
16
45806ef8 »
2011-09-20 Always show scrollbars.
17 # Always show scrollbars
18 defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
19
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
20 # Disable opening and closing window animations
21 defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
22
23 # Increase window resize speed for Cocoa applications
24 defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
25
7d022705 »
2011-09-05 Initial commit.
26 # Expand save panel by default
f1506922 »
2011-09-20 Use `NSGlobalDomain` instead of `-g`.
27 defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
7d022705 »
2011-09-05 Initial commit.
28
29 # Expand print panel by default
f1506922 »
2011-09-20 Use `NSGlobalDomain` instead of `-g`.
30 defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
7d022705 »
2011-09-05 Initial commit.
31
cdbb059f »
2011-09-20 Disable the “Are you sure you want to open this application?” dialog.
32 # Disable the “Are you sure you want to open this application?” dialog
33 defaults write com.apple.LaunchServices LSQuarantine -bool false
34
61163c8a »
2012-04-10 .osx: Group commands by type
35 # Display ASCII control characters using caret notation in standard text views
36 # Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`
37 defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
7d022705 »
2011-09-05 Initial commit.
38
61163c8a »
2012-04-10 .osx: Group commands by type
39 # Disable Resume system-wide
40 defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
6b3819f1 »
2011-09-20 Show indicator lights for open applications in the Dock, and don’t an…
41
5b4e9d13 »
2012-06-27 .osx: Disable automatic termination of inactive apps
42 # Disable automatic termination of inactive apps
43 defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
44
61163c8a »
2012-04-10 .osx: Group commands by type
45 # Fix for the ancient UTF-8 bug in QuickLook (http://mths.be/bbo)
46 # Commented out, as this is known to cause problems when saving files in Adobe Illustrator CS5 :(
47 #echo "0x08000100:0" > ~/.CFUserTextEncoding
7134df85 »
2012-04-02 .osx: Remove the auto-hiding Dock delay
48
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
49 ###############################################################################
95ed1a16 »
2012-07-18 .osx: Increase sound quality for Bluetooth headphones/headsets
50 # Trackpad, mouse, keyboard, Bluetooth accessories, and input #
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
51 ###############################################################################
61163c8a »
2012-04-10 .osx: Group commands by type
52
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
53 # Trackpad: enable tap to click for this user and for the login screen
54 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
55 defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
56 defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
57
58 # Trackpad: map bottom right corner to right-click
59 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
60 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
61 defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
62 defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
63
64 # Trackpad: swipe between pages with three fingers
f0ac6582 »
2012-06-28 .osx: Explicitly enable swipe between pages
65 defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool true
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
66 defaults -currentHost write NSGlobalDomain com.apple.trackpad.threeFingerHorizSwipeGesture -int 1
67 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerHorizSwipeGesture -int 1
68
6a424194 »
2012-06-27 .osx: Minor formatting tweak
69 # Disable “natural” (Lion-style) scrolling
70 defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
71
95ed1a16 »
2012-07-18 .osx: Increase sound quality for Bluetooth headphones/headsets
72 # Increase sound quality for Bluetooth headphones/headsets
73 defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
74
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
75 # Enable full keyboard access for all controls
76 # (e.g. enable Tab in modal dialogs)
77 defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
78
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
79 # Disable press-and-hold for keys in favor of key repeat
f1506922 »
2011-09-20 Use `NSGlobalDomain` instead of `-g`.
80 defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
81
7c463423 »
2011-09-23 Set a blazingly fast keyboard repeat rate.
82 # Set a blazingly fast keyboard repeat rate
83 defaults write NSGlobalDomain KeyRepeat -int 0
84
24045d9f »
2012-06-26 .osx: Set language and text formats
85 # Set language and text formats
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
86 # Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
87 # `Inches`, and `true` with `false`.
24045d9f »
2012-06-26 .osx: Set language and text formats
88 defaults write NSGlobalDomain AppleLanguages -array "en" "nl"
89 defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
90 defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
91 defaults write NSGlobalDomain AppleMetricUnits -bool true
92
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
93 # Disable auto-correct
94 defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
95
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
96 ###############################################################################
97 # Screen #
98 ###############################################################################
29ae35c5 »
2012-06-27 .osx: Enable swipe between pages with three fingers
99
61163c8a »
2012-04-10 .osx: Group commands by type
100 # Require password immediately after sleep or screen saver begins
101 defaults write com.apple.screensaver askForPassword -int 1
102 defaults write com.apple.screensaver askForPasswordDelay -int 0
103
7baa45cc »
2012-04-30 .osx: Clean up after commit 5b36bee
104 # Save screenshots to the desktop
105 defaults write com.apple.screencapture location -string "$HOME/Desktop"
106
107 # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
108 defaults write com.apple.screencapture type -string "png"
109
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
110 # Disable shadow in screenshots
111 defaults write com.apple.screencapture disable-shadow -bool true
112
113 # Enable subpixel font rendering on non-Apple LCDs
114 defaults write NSGlobalDomain AppleFontSmoothing -int 2
115
116 ###############################################################################
117 # Finder #
118 ###############################################################################
119
120 # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
61163c8a »
2012-04-10 .osx: Group commands by type
121 defaults write com.apple.finder QuitMenuItem -bool true
122
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
123 # Finder: disable window animations and Get Info animations
61163c8a »
2012-04-10 .osx: Group commands by type
124 defaults write com.apple.finder DisableAllAnimations -bool true
125
c53f2223 »
2012-07-12 .osx: Show hidden files by default in Finder
126 # Finder: show hidden files by default
127 defaults write com.apple.Finder AppleShowAllFiles -bool true
128
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
129 # Finder: show all filename extensions
61163c8a »
2012-04-10 .osx: Group commands by type
130 defaults write NSGlobalDomain AppleShowAllExtensions -bool true
131
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
132 # Finder: show status bar
61163c8a »
2012-04-10 .osx: Group commands by type
133 defaults write com.apple.finder ShowStatusBar -bool true
134
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
135 # Finder: allow text selection in Quick Look
61163c8a »
2012-04-10 .osx: Group commands by type
136 defaults write com.apple.finder QLEnableTextSelection -bool true
2433b1bb »
2011-09-20 Enable AirDrop over Ethernet and on unsupported Macs running OS X Lion.
137
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
138 # Display full POSIX path as Finder window title
139 defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
140
141 # Disable the warning when changing a file extension
142 defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
143
144 # Avoid creating .DS_Store files on network volumes
145 defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
146
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
147 # Disable disk image verification
148 defaults write com.apple.frameworks.diskimages skip-verify -bool true
149 defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
150 defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
151
152 # Automatically open a new Finder window when a volume is mounted
153 defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
154 defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
155 defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
156
9bb2dcef »
2011-09-24 Show item info below desktop icons.
157 # Show item info below desktop icons
ba9b8b8a »
2011-09-24 Use full PlistBuddy path instead of the alias, so `.osx` can be used …
158 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
9bb2dcef »
2011-09-24 Show item info below desktop icons.
159
dda45e2c »
2012-02-22 .osx: Enable snap-to-grid for desktop icons
160 # Enable snap-to-grid for desktop icons
161 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
162
df460553 »
2011-09-23 Disable the warning before emptying the Trash.
163 # Disable the warning before emptying the Trash
164 defaults write com.apple.finder WarnOnEmptyTrash -bool false
165
51fba19b »
2011-09-23 Empty Trash securely by default.
166 # Empty Trash securely by default
167 defaults write com.apple.finder EmptyTrashSecurely -bool true
168
61163c8a »
2012-04-10 .osx: Group commands by type
169 # Enable AirDrop over Ethernet and on unsupported Macs running Lion
170 defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
b8fbd682 »
2011-09-21 Require password immediately after sleep or screen saver begins. (Can…
171
61163c8a »
2012-04-10 .osx: Group commands by type
172 # Show the ~/Library folder
173 chflags nohidden ~/Library
50c583f8 »
2011-09-23 Enable tap to click (Trackpad).
174
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
175 # Remove Dropbox’s green checkmark icons in Finder
176 file=/Applications/Dropbox.app/Contents/Resources/check.icns
177 [ -e "$file" ] && mv -f "$file" "$file.bak"
178 unset file
179
180 ###############################################################################
181 # Dock & hot corners #
182 ###############################################################################
6e45face »
2012-04-10 .osx: Add hot corners
183
61163c8a »
2012-04-10 .osx: Group commands by type
184 # Enable highlight hover effect for the grid view of a stack (Dock)
185 defaults write com.apple.dock mouse-over-hilte-stack -bool true
186
9898899c »
2012-04-30 .osx: Set the icon size of Dock items to 36 pixels
187 # Set the icon size of Dock items to 36 pixels
188 defaults write com.apple.dock tilesize -int 36
c8e40aa9 » Cedric Kastner
2012-04-26 Icon size of 48 pixels for dock items
189
61163c8a »
2012-04-10 .osx: Group commands by type
190 # Enable spring loading for all Dock items
191 defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
192
193 # Show indicator lights for open applications in the Dock
194 defaults write com.apple.dock show-process-indicators -bool true
195
196 # Don’t animate opening applications from the Dock
197 defaults write com.apple.dock launchanim -bool false
198
22ecf0a3 »
2012-06-27 .osx: Speed up Mission Control animations
199 # Speed up Mission Control animations
200 defaults write com.apple.dock expose-animation-duration -float 0.1
201
61163c8a »
2012-04-10 .osx: Group commands by type
202 # Remove the auto-hiding Dock delay
203 defaults write com.apple.Dock autohide-delay -float 0
4623943f »
2012-04-10 .osx: Cleanup
204 # Remove the animation when hiding/showing the Dock
205 defaults write com.apple.dock autohide-time-modifier -float 0
f60e3e64 » fruityth1ng
2012-04-10 # Shorten Dock show animation speed
206
61163c8a »
2012-04-10 .osx: Group commands by type
207 # Enable the 2D Dock
2d0737e9 »
2012-07-26 .osx: Comment out the line that enables the 2D Dock
208 #defaults write com.apple.dock no-glass -bool true
61163c8a »
2012-04-10 .osx: Group commands by type
209
210 # Automatically hide and show the Dock
211 defaults write com.apple.dock autohide -bool true
212
213 # Make Dock icons of hidden applications translucent
214 defaults write com.apple.dock showhidden -bool true
215
216 # Enable iTunes track notifications in the Dock
217 defaults write com.apple.dock itunes-notifications -bool true
218
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
219 # Reset Launchpad
220 find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete
221
61163c8a »
2012-04-10 .osx: Group commands by type
222 # Add a spacer to the left side of the Dock (where the applications are)
223 #defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
224 # Add a spacer to the right side of the Dock (where the Trash is)
225 #defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'
226
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
227 # Hot corners
228 # Top left screen corner → Mission Control
229 defaults write com.apple.dock wvous-tl-corner -int 2
230 defaults write com.apple.dock wvous-tl-modifier -int 0
231 # Top right screen corner → Desktop
232 defaults write com.apple.dock wvous-tr-corner -int 4
233 defaults write com.apple.dock wvous-tr-modifier -int 0
234 # Bottom left screen corner → Start screen saver
235 defaults write com.apple.dock wvous-bl-corner -int 5
236 defaults write com.apple.dock wvous-bl-modifier -int 0
237
238 ###############################################################################
239 # Safari & WebKit #
240 ###############################################################################
1ab9402e »
2011-09-21 Map bottom right Trackpad corner to secondary click (right-click).
241
7d022705 »
2011-09-05 Initial commit.
242 # Disable Safari’s thumbnail cache for History and Top Sites
243 defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
244
558b2c46 »
2011-09-08 Enable Safari’s debug menu.
245 # Enable Safari’s debug menu
fc439ad5 »
2011-10-19 Looks like `IncludeDebugMenu` was replaced by `IncludeInternalDebugMe…
246 defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
558b2c46 »
2011-09-08 Enable Safari’s debug menu.
247
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
248 # Make Safari’s search banners default to Contains instead of Starts With
249 defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
250
7d022705 »
2011-09-05 Initial commit.
251 # Remove useless icons from Safari’s bookmarks bar
252 defaults write com.apple.Safari ProxiesInBookmarksBar "()"
253
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
254 # Add a context menu item for showing the Web Inspector in web views
255 defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
72860bec »
2012-04-03 .osx: Enable the debug menu in iCal and Address Book
256
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
257 ###############################################################################
45676def »
2012-06-27 .osx: Enable the debug menu in Disk Utility
258 # Address Book, Dashboard, iCal, iTunes, Mail, and Disk Utility #
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
259 ###############################################################################
260
72860bec »
2012-04-03 .osx: Enable the debug menu in iCal and Address Book
261 # Enable the debug menu in Address Book
262 defaults write com.apple.addressbook ABShowDebugMenu -bool true
263
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
264 # Enable Dashboard dev mode (allows keeping widgets on the desktop)
265 defaults write com.apple.dashboard devmode -bool true
266
72860bec »
2012-04-03 .osx: Enable the debug menu in iCal and Address Book
267 # Enable the debug menu in iCal
268 defaults write com.apple.iCal IncludeDebugMenu -bool true
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
269
289c3ea4 »
2012-07-02 .osx: Disable the iTunes arrow links completely
270 # Make the iTunes arrow links go to your library instead of the iTunes Store
271 defaults write com.apple.iTunes invertStoreLinks -bool true
272
273 # Disable the iTunes arrow links completely
274 defaults write com.apple.iTunes show-store-arrow-links -bool false
6c2be0e0 » kevinlawler
2012-07-01 .osx: Make iTunes arrows go to your library by default (rather than t…
275
17c5050f »
2011-09-24 Disable the Ping sidebar in iTunes.
276 # Disable the Ping sidebar in iTunes
277 defaults write com.apple.iTunes disablePingSidebar -bool true
278
36c45978 »
2011-09-24 Disable Ping entirely.
279 # Disable all the other Ping stuff in iTunes
280 defaults write com.apple.iTunes disablePing -bool true
281
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
282 # Make ⌘ + F focus the search input in iTunes
283 defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
284
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
285 # Disable send and reply animations in Mail.app
286 defaults write com.apple.Mail DisableReplyAnimations -bool true
287 defaults write com.apple.Mail DisableSendAnimations -bool true
7d022705 »
2011-09-05 Initial commit.
288
42f7f7be »
2012-03-31 .osx: Copy email addresses as `foo@example.com` instead of `Foo Bar <…
289 # Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
290 defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
291
45676def »
2012-06-27 .osx: Enable the debug menu in Disk Utility
292 # Enable the debug menu in Disk Utility
293 defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
294
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
295 ###############################################################################
296 # Terminal #
297 ###############################################################################
5be688e0 » jpsirois
2011-09-06 Remove the disturbing ".dmg" Mounting Verification
298
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
299 # Only use UTF-8 in Terminal.app
300 defaults write com.apple.terminal StringEncodings -array 4
301
302 # Enable “focus follows mouse” for Terminal.app and all X11 apps
303 # This means you can hover over a window and start typing in it without clicking first
304 #defaults write com.apple.terminal FocusFollowsMouse -bool true
305 #defaults write org.x.X11 wm_ffm -bool true
306
307 ###############################################################################
308 # Time Machine #
309 ###############################################################################
7d022705 »
2011-09-05 Initial commit.
310
997cb325 »
2012-04-12 .osx: Prevent Time Machine from prompting to use new hard drives as b…
311 # Prevent Time Machine from prompting to use new hard drives as backup volume
312 defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
313
7d022705 »
2011-09-05 Initial commit.
314 # Disable local Time Machine backups
439e6f5a »
2011-09-24 Check if `tmutil` is available before using it. (It’s not available o…
315 hash tmutil &> /dev/null && sudo tmutil disablelocal
7d022705 »
2011-09-05 Initial commit.
316
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
317 ###############################################################################
318 # Kill affected applications #
319 ###############################################################################
59c28630 »
2011-10-22 Remove the green checkmark icons in Dropbox.
320
6a424194 »
2012-06-27 .osx: Minor formatting tweak
321 for app in Finder Dock Mail Safari iTunes iCal Address\ Book SystemUIServer; do
322 killall "$app" > /dev/null 2>&1
323 done
7baa45cc »
2012-04-30 .osx: Clean up after commit 5b36bee
324 echo "Done. Note that some of these changes require a logout/restart to take effect."
Something went wrong with that request. Please try again.