Skip to content

HTTPS clone URL

Subversion checkout URL

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