Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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