Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 466 lines (340 sloc) 22.261 kB
96c2696 @mathiasbynens .osx: Ask for the administrator password upfront
authored
1 #!/bin/bash
2
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
3 # ~/.osx — http://mths.be/osx
4
96c2696 @mathiasbynens .osx: Ask for the administrator password upfront
authored
5 # Ask for the administrator password upfront
6 sudo -v
7
8 # Keep-alive: update existing `sudo` time stamp until `.osx` has finished
9 while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
10
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
11 ###############################################################################
12 # General UI/UX #
13 ###############################################################################
14
fc19665 @mathiasbynens .osx: Set computer name
authored
15 # Set computer name (as done via System Preferences → Sharing)
96c2696 @mathiasbynens .osx: Ask for the administrator password upfront
authored
16 sudo scutil --set ComputerName "MathBook Pro"
17 sudo scutil --set HostName "MathBook Pro"
18 sudo scutil --set LocalHostName "MathBook-Pro"
c1ebe45 @mathiasbynens .osx: Set NetBIOS name
authored
19 defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "MathBook-Pro"
fc19665 @mathiasbynens .osx: Set computer name
authored
20
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
21 # Menu bar: disable transparency
f150692 @mathiasbynens Use `NSGlobalDomain` instead of `-g`.
authored
22 defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
7d02270 @mathiasbynens Initial commit.
authored
23
fc19665 @mathiasbynens .osx: Set computer name
authored
24 # Menu bar: show remaining battery time (on pre-10.8); hide percentage
91918d7 @mathiasbynens Show remaining battery time; hide percentage.
authored
25 defaults write com.apple.menuextra.battery ShowPercent -string "NO"
26 defaults write com.apple.menuextra.battery ShowTime -string "YES"
27
4e31acd @mathiasbynens .osx: Hide the useless Time Machine and Volume icons
authored
28 # Menu bar: hide the useless Time Machine and Volume icons
29 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"
30
45806ef @mathiasbynens Always show scrollbars.
authored
31 # Always show scrollbars
32 defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
33
3d4c417 @mathiasbynens .osx: Add commented out command to disable smooth scrolling
authored
34 # Disable smooth scrolling
35 # (Uncomment if you’re on an older Mac that messes up the animation)
36 #defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false
37
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
38 # Disable opening and closing window animations
39 defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
40
41 # Increase window resize speed for Cocoa applications
42 defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
43
7d02270 @mathiasbynens Initial commit.
authored
44 # Expand save panel by default
f150692 @mathiasbynens Use `NSGlobalDomain` instead of `-g`.
authored
45 defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
7d02270 @mathiasbynens Initial commit.
authored
46
47 # Expand print panel by default
f150692 @mathiasbynens Use `NSGlobalDomain` instead of `-g`.
authored
48 defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
7d02270 @mathiasbynens Initial commit.
authored
49
67a2976 @mathiasbynens .osx: Automatically quit printer app once the print jobs complete
authored
50 # Automatically quit printer app once the print jobs complete
51 defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
52
cdbb059 @mathiasbynens Disable the “Are you sure you want to open this application?” dialog.
authored
53 # Disable the “Are you sure you want to open this application?” dialog
54 defaults write com.apple.LaunchServices LSQuarantine -bool false
55
61163c8 @mathiasbynens .osx: Group commands by type
authored
56 # Display ASCII control characters using caret notation in standard text views
57 # Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`
58 defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
7d02270 @mathiasbynens Initial commit.
authored
59
61163c8 @mathiasbynens .osx: Group commands by type
authored
60 # Disable Resume system-wide
61 defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
6b3819f @mathiasbynens Show indicator lights for open applications in the Dock, and don’t an…
authored
62
5b4e9d1 @mathiasbynens .osx: Disable automatic termination of inactive apps
authored
63 # Disable automatic termination of inactive apps
64 defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
65
61163c8 @mathiasbynens .osx: Group commands by type
authored
66 # Fix for the ancient UTF-8 bug in QuickLook (http://mths.be/bbo)
7bbbe8d @mathiasbynens .osx: Reveal IP address, hostname, OS version, etc. when clicking the…
authored
67 # Commented out, as this is known to cause problems when saving files in
68 # Adobe Illustrator CS5 :(
61163c8 @mathiasbynens .osx: Group commands by type
authored
69 #echo "0x08000100:0" > ~/.CFUserTextEncoding
7134df8 @mathiasbynens .osx: Remove the auto-hiding Dock delay
authored
70
7bbbe8d @mathiasbynens .osx: Reveal IP address, hostname, OS version, etc. when clicking the…
authored
71 # Reveal IP address, hostname, OS version, etc. when clicking the clock
72 # in the login window
73 sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
74
41431ac @mathiasbynens .osx: Add energy saver preferences
authored
75 # Restart automatically if the computer freezes
76 systemsetup -setrestartfreeze on
77
78 # Never go into computer sleep mode
79 systemsetup -setcomputersleep Off > /dev/null
80
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
81 ###############################################################################
95ed1a1 @mathiasbynens .osx: Increase sound quality for Bluetooth headphones/headsets
authored
82 # Trackpad, mouse, keyboard, Bluetooth accessories, and input #
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
83 ###############################################################################
61163c8 @mathiasbynens .osx: Group commands by type
authored
84
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
85 # Trackpad: enable tap to click for this user and for the login screen
86 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
87 defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
88 defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
89
90 # Trackpad: map bottom right corner to right-click
91 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
92 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
93 defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
94 defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
95
96 # Trackpad: swipe between pages with three fingers
f0ac658 @mathiasbynens .osx: Explicitly enable swipe between pages
authored
97 defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool true
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
98 defaults -currentHost write NSGlobalDomain com.apple.trackpad.threeFingerHorizSwipeGesture -int 1
99 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerHorizSwipeGesture -int 1
100
6a42419 @mathiasbynens .osx: Minor formatting tweak
authored
101 # Disable “natural” (Lion-style) scrolling
102 defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
103
95ed1a1 @mathiasbynens .osx: Increase sound quality for Bluetooth headphones/headsets
authored
104 # Increase sound quality for Bluetooth headphones/headsets
105 defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
106
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
107 # Enable full keyboard access for all controls
108 # (e.g. enable Tab in modal dialogs)
109 defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored
110
b9fa939 @mathiasbynens .osx: Enable access for assistive devices
authored
111 # Enable access for assistive devices
112 echo -n 'a' | sudo tee /private/var/db/.AccessibilityAPIEnabled > /dev/null 2>&1
113 sudo chmod 444 /private/var/db/.AccessibilityAPIEnabled
114 # TODO: avoid GUI password prompt somehow (http://apple.stackexchange.com/q/60476/4408)
115 #sudo osascript -e 'tell application "System Events" to set UI elements enabled to true'
116
76b752d @mathiasbynens .osx: Enable scroll to zoom
authored
117 # Use scroll gesture with the Ctrl (^) modifier key to zoom
118 defaults write com.apple.universalaccess 'closeViewScrollWheelToggle' -bool true
119 defaults write com.apple.universalaccess 'HIDScrollZoomModifierMask' -int 262144
120 # Follow the keyboard focus while zoomed in
121 defaults write com.apple.universalaccess 'closeViewZoomFollowsFocus' -bool true
122
a407d5d @mathiasbynens Add some more goodies to .osx.
authored
123 # Disable press-and-hold for keys in favor of key repeat
f150692 @mathiasbynens Use `NSGlobalDomain` instead of `-g`.
authored
124 defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
a407d5d @mathiasbynens Add some more goodies to .osx.
authored
125
7c46342 @mathiasbynens Set a blazingly fast keyboard repeat rate.
authored
126 # Set a blazingly fast keyboard repeat rate
127 defaults write NSGlobalDomain KeyRepeat -int 0
128
9cf1978 @mathiasbynens .osx: Automatically illuminate built-in MacBook keyboard in low light
authored
129 # Automatically illuminate built-in MacBook keyboard in low light
130 defaults write com.apple.BezelServices 'kDim' -bool true
131 # Turn off keyboard illumination when computer is not used for 5 minutes
132 defaults write com.apple.BezelServices 'kDimTime' -int 300
133
24045d9 @mathiasbynens .osx: Set language and text formats
authored
134 # Set language and text formats
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
135 # Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
136 # `Inches`, and `true` with `false`.
24045d9 @mathiasbynens .osx: Set language and text formats
authored
137 defaults write NSGlobalDomain AppleLanguages -array "en" "nl"
138 defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
139 defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
140 defaults write NSGlobalDomain AppleMetricUnits -bool true
141
1503abf @mathiasbynens .osx: Set the timezone
authored
142 # Set the timezone; see `systemsetup -listtimezones` for other values
143 systemsetup -settimezone "Europe/Brussels"
144
a407d5d @mathiasbynens Add some more goodies to .osx.
authored
145 # Disable auto-correct
146 defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
147
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
148 ###############################################################################
149 # Screen #
150 ###############################################################################
29ae35c @mathiasbynens .osx: Enable swipe between pages with three fingers
authored
151
61163c8 @mathiasbynens .osx: Group commands by type
authored
152 # Require password immediately after sleep or screen saver begins
153 defaults write com.apple.screensaver askForPassword -int 1
154 defaults write com.apple.screensaver askForPasswordDelay -int 0
155
7baa45c @mathiasbynens .osx: Clean up after commit 5b36bee8676dc8e800f68e3a559e102dcefcae36
authored
156 # Save screenshots to the desktop
157 defaults write com.apple.screencapture location -string "$HOME/Desktop"
158
159 # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
160 defaults write com.apple.screencapture type -string "png"
161
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
162 # Disable shadow in screenshots
163 defaults write com.apple.screencapture disable-shadow -bool true
164
165 # Enable subpixel font rendering on non-Apple LCDs
166 defaults write NSGlobalDomain AppleFontSmoothing -int 2
167
97a3318 @porada .osx: Enable HiDPI display modes without using Quartz Debug
porada authored
168 # Enable HiDPI display modes (requires restart)
169 sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
170
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
171 ###############################################################################
172 # Finder #
173 ###############################################################################
174
175 # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
61163c8 @mathiasbynens .osx: Group commands by type
authored
176 defaults write com.apple.finder QuitMenuItem -bool true
177
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
178 # Finder: disable window animations and Get Info animations
61163c8 @mathiasbynens .osx: Group commands by type
authored
179 defaults write com.apple.finder DisableAllAnimations -bool true
180
e4d22ec @mathiasbynens .osx: Show icons for hard drives, servers, and removable media on the…
authored
181 # Show icons for hard drives, servers, and removable media on the desktop
182 defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
183 defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
184 defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
185 defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
186
c53f222 @mathiasbynens .osx: Show hidden files by default in Finder
authored
187 # Finder: show hidden files by default
188 defaults write com.apple.Finder AppleShowAllFiles -bool true
189
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
190 # Finder: show all filename extensions
61163c8 @mathiasbynens .osx: Group commands by type
authored
191 defaults write NSGlobalDomain AppleShowAllExtensions -bool true
192
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
193 # Finder: show status bar
61163c8 @mathiasbynens .osx: Group commands by type
authored
194 defaults write com.apple.finder ShowStatusBar -bool true
195
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
196 # Finder: allow text selection in Quick Look
61163c8 @mathiasbynens .osx: Group commands by type
authored
197 defaults write com.apple.finder QLEnableTextSelection -bool true
2433b1b @mathiasbynens Enable AirDrop over Ethernet and on unsupported Macs running OS X Lion.
authored
198
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
199 # Display full POSIX path as Finder window title
200 defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
201
06c9e88 @mathiasbynens .osx: When performing a search, search the current folder by default …
authored
202 # When performing a search, search the current folder by default
203 defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
204
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
205 # Disable the warning when changing a file extension
206 defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
207
208 # Avoid creating .DS_Store files on network volumes
209 defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
210
a407d5d @mathiasbynens Add some more goodies to .osx.
authored
211 # Disable disk image verification
212 defaults write com.apple.frameworks.diskimages skip-verify -bool true
213 defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
214 defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
215
216 # Automatically open a new Finder window when a volume is mounted
217 defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
218 defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored
219 defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
a407d5d @mathiasbynens Add some more goodies to .osx.
authored
220
a168e93 @mathiasbynens .osx: Add more Finder settings for icons on the desktop and in icon v…
authored
221 # Show item info below icons on the desktop and in other icon views
ba9b8b8 @mathiasbynens Use full PlistBuddy path instead of the alias, so `.osx` can be used …
authored
222 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
a168e93 @mathiasbynens .osx: Add more Finder settings for icons on the desktop and in icon v…
authored
223 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
224 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
9bb2dce @mathiasbynens Show item info below desktop icons.
authored
225
a168e93 @mathiasbynens .osx: Add more Finder settings for icons on the desktop and in icon v…
authored
226 # Enable snap-to-grid for icons on the desktop and in other icon views
dda45e2 @mathiasbynens .osx: Enable snap-to-grid for desktop icons
authored
227 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
a168e93 @mathiasbynens .osx: Add more Finder settings for icons on the desktop and in icon v…
authored
228 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
229 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
230
231 # Increase grid spacing for icons on the desktop and in other icon views
232 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
233 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
234 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
235
236 # Increase the size of icons on the desktop and in other icon views
237 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
238 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
239 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
dda45e2 @mathiasbynens .osx: Enable snap-to-grid for desktop icons
authored
240
755584e @mathiasbynens .osx: Use list view in all Finder windows by default
authored
241 # Use list view in all Finder windows by default
242 # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
243 defaults write com.apple.Finder FXPreferredViewStyle -string "Nlsv"
244
df46055 @mathiasbynens Disable the warning before emptying the Trash.
authored
245 # Disable the warning before emptying the Trash
246 defaults write com.apple.finder WarnOnEmptyTrash -bool false
247
51fba19 @mathiasbynens Empty Trash securely by default.
authored
248 # Empty Trash securely by default
249 defaults write com.apple.finder EmptyTrashSecurely -bool true
250
61163c8 @mathiasbynens .osx: Group commands by type
authored
251 # Enable AirDrop over Ethernet and on unsupported Macs running Lion
252 defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
b8fbd68 @mathiasbynens Require password immediately after sleep or screen saver begins. (Can…
authored
253
61163c8 @mathiasbynens .osx: Group commands by type
authored
254 # Show the ~/Library folder
255 chflags nohidden ~/Library
50c583f @mathiasbynens Enable tap to click (Trackpad).
authored
256
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
257 # Remove Dropbox’s green checkmark icons in Finder
258 file=/Applications/Dropbox.app/Contents/Resources/check.icns
259 [ -e "$file" ] && mv -f "$file" "$file.bak"
260 unset file
261
262 ###############################################################################
263 # Dock & hot corners #
264 ###############################################################################
6e45fac @mathiasbynens .osx: Add hot corners
authored
265
61163c8 @mathiasbynens .osx: Group commands by type
authored
266 # Enable highlight hover effect for the grid view of a stack (Dock)
267 defaults write com.apple.dock mouse-over-hilte-stack -bool true
268
9898899 @mathiasbynens .osx: Set the icon size of Dock items to 36 pixels
authored
269 # Set the icon size of Dock items to 36 pixels
270 defaults write com.apple.dock tilesize -int 36
c8e40aa Icon size of 48 pixels for dock items
Cedric Kastner authored
271
61163c8 @mathiasbynens .osx: Group commands by type
authored
272 # Enable spring loading for all Dock items
273 defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
274
275 # Show indicator lights for open applications in the Dock
276 defaults write com.apple.dock show-process-indicators -bool true
277
278 # Don’t animate opening applications from the Dock
279 defaults write com.apple.dock launchanim -bool false
280
22ecf0a @mathiasbynens .osx: Speed up Mission Control animations
authored
281 # Speed up Mission Control animations
282 defaults write com.apple.dock expose-animation-duration -float 0.1
283
9c934b8 @mathiasbynens .osx: Don’t group windows by application in Mission Control
authored
284 # Don’t group windows by application in Mission Control
285 # (i.e. use the old Exposé behavior instead)
286 defaults write com.apple.dock "expose-group-by-app" -bool false
66911ae @mathiasbynens .osx: Group windows by application in Mission Control
authored
287
205b8b1 @mathiasbynens .osx: Don’t show Dashboard as a Space
authored
288 # Don’t show Dashboard as a Space
289 defaults write com.apple.dock "dashboard-in-overlay" -bool true
290
61163c8 @mathiasbynens .osx: Group commands by type
authored
291 # Remove the auto-hiding Dock delay
292 defaults write com.apple.Dock autohide-delay -float 0
4623943 @mathiasbynens .osx: Cleanup
authored
293 # Remove the animation when hiding/showing the Dock
294 defaults write com.apple.dock autohide-time-modifier -float 0
f60e3e6 @nimbling # Shorten Dock show animation speed
nimbling authored
295
61163c8 @mathiasbynens .osx: Group commands by type
authored
296 # Enable the 2D Dock
2d0737e @mathiasbynens .osx: Comment out the line that enables the 2D Dock
authored
297 #defaults write com.apple.dock no-glass -bool true
61163c8 @mathiasbynens .osx: Group commands by type
authored
298
299 # Automatically hide and show the Dock
300 defaults write com.apple.dock autohide -bool true
301
302 # Make Dock icons of hidden applications translucent
303 defaults write com.apple.dock showhidden -bool true
304
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
305 # Reset Launchpad
306 find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete
307
61163c8 @mathiasbynens .osx: Group commands by type
authored
308 # Add a spacer to the left side of the Dock (where the applications are)
309 #defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
310 # Add a spacer to the right side of the Dock (where the Trash is)
311 #defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'
312
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
313 # Hot corners
314 # Top left screen corner → Mission Control
315 defaults write com.apple.dock wvous-tl-corner -int 2
316 defaults write com.apple.dock wvous-tl-modifier -int 0
317 # Top right screen corner → Desktop
318 defaults write com.apple.dock wvous-tr-corner -int 4
319 defaults write com.apple.dock wvous-tr-modifier -int 0
320 # Bottom left screen corner → Start screen saver
321 defaults write com.apple.dock wvous-bl-corner -int 5
322 defaults write com.apple.dock wvous-bl-modifier -int 0
323
324 ###############################################################################
325 # Safari & WebKit #
326 ###############################################################################
1ab9402 @mathiasbynens Map bottom right Trackpad corner to secondary click (right-click).
authored
327
b912e0b @mathiasbynens .osx: Set Safari’s home page to `about:blank`
authored
328 # Set Safari’s home page to `about:blank` for faster loading
329 defaults write com.apple.Safari HomePage -string "about:blank"
330
f2975b1 @mathiasbynens .osx: Allow hitting the Backspace key to go to the previous page in S…
authored
331 # Allow hitting the Backspace key to go to the previous page in history
332 defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true
333
390d0fd @mathiasbynens .osx: Hide Safari’s bookmarks bar by default
authored
334 # Hide Safari’s bookmarks bar by default
335 defaults write com.apple.Safari ShowFavoritesBar -bool false
336
7d02270 @mathiasbynens Initial commit.
authored
337 # Disable Safari’s thumbnail cache for History and Top Sites
338 defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
339
558b2c4 @mathiasbynens Enable Safari’s debug menu.
authored
340 # Enable Safari’s debug menu
fc439ad @mathiasbynens Looks like `IncludeDebugMenu` was replaced by `IncludeInternalDebugMe…
authored
341 defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
558b2c4 @mathiasbynens Enable Safari’s debug menu.
authored
342
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored
343 # Make Safari’s search banners default to Contains instead of Starts With
344 defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
345
7d02270 @mathiasbynens Initial commit.
authored
346 # Remove useless icons from Safari’s bookmarks bar
347 defaults write com.apple.Safari ProxiesInBookmarksBar "()"
348
93bb039 @mathiasbynens .osx: Enable the Develop Menu and the Web Inspector in Safari
authored
349 # Enable the Develop menu and the Web Inspector in Safari
350 defaults write com.apple.Safari IncludeDevelopMenu -bool true
351 defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
352 defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true
353
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored
354 # Add a context menu item for showing the Web Inspector in web views
355 defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
72860be @mathiasbynens .osx: Enable the debug menu in iCal and Address Book
authored
356
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
357 ###############################################################################
45676de @mathiasbynens .osx: Enable the debug menu in Disk Utility
authored
358 # Address Book, Dashboard, iCal, iTunes, Mail, and Disk Utility #
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
359 ###############################################################################
360
72860be @mathiasbynens .osx: Enable the debug menu in iCal and Address Book
authored
361 # Enable the debug menu in Address Book
362 defaults write com.apple.addressbook ABShowDebugMenu -bool true
363
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
364 # Enable Dashboard dev mode (allows keeping widgets on the desktop)
365 defaults write com.apple.dashboard devmode -bool true
366
064fa96 @mathiasbynens .osx: Add a note saying that the iCal debug menu tweak doesn’t work i…
authored
367 # Enable the debug menu in iCal (pre-10.8)
72860be @mathiasbynens .osx: Enable the debug menu in iCal and Address Book
authored
368 defaults write com.apple.iCal IncludeDebugMenu -bool true
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored
369
03f1e47 @mathiasbynens .osx: Update some iTunes tweaks to work with iTunes 10.6.3
authored
370 # Disable the iTunes store link arrows
371 defaults write com.apple.iTunes show-store-link-arrows -bool false
6c2be0e @kevinlawler .osx: Make iTunes arrows go to your library by default (rather than t…
kevinlawler authored
372
4a7598c @mathiasbynens .osx: Disable the Genius sidebar in iTunes
authored
373 # Disable the Genius sidebar in iTunes
374 defaults write com.apple.iTunes disableGeniusSidebar -bool true
375
17c5050 @mathiasbynens Disable the Ping sidebar in iTunes.
authored
376 # Disable the Ping sidebar in iTunes
377 defaults write com.apple.iTunes disablePingSidebar -bool true
378
36c4597 @mathiasbynens Disable Ping entirely.
authored
379 # Disable all the other Ping stuff in iTunes
380 defaults write com.apple.iTunes disablePing -bool true
381
6f89f05 @mathiasbynens .osx: Disable radio stations in iTunes
authored
382 # Disable radio stations in iTunes
383 defaults write com.apple.iTunes disableRadio -bool true
384
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored
385 # Make ⌘ + F focus the search input in iTunes
7d9a9f2 @mathiasbynens .osx: Explain how to use the ⌘ + F iTunes hack with other system lang…
authored
386 # To use these commands in another language, browse iTunes’s package contents,
387 # open `Contents/Resources/your-language.lproj/Localizable.strings`, and look
4267ea9 @mathiasbynens .osx: Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
authored
388 # for `kHiddenMenuItemTargetSearch`.
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored
389 defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
390
a407d5d @mathiasbynens Add some more goodies to .osx.
authored
391 # Disable send and reply animations in Mail.app
392 defaults write com.apple.Mail DisableReplyAnimations -bool true
393 defaults write com.apple.Mail DisableSendAnimations -bool true
7d02270 @mathiasbynens Initial commit.
authored
394
42f7f7b @mathiasbynens .osx: Copy email addresses as `foo@example.com` instead of `Foo Bar <…
authored
395 # Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
396 defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
397
4267ea9 @mathiasbynens .osx: Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
authored
398 # Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
399 defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9"
400
45676de @mathiasbynens .osx: Enable the debug menu in Disk Utility
authored
401 # Enable the debug menu in Disk Utility
402 defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
6b2cab2 @mathiasbynens .osx: Enable advanced image options in Disk Utility’s debug menu
authored
403 defaults write com.apple.DiskUtility advanced-image-options -bool true
45676de @mathiasbynens .osx: Enable the debug menu in Disk Utility
authored
404
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
405 ###############################################################################
406 # Terminal #
407 ###############################################################################
5be688e @jpsirois Remove the disturbing ".dmg" Mounting Verification
jpsirois authored
408
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
409 # Only use UTF-8 in Terminal.app
410 defaults write com.apple.terminal StringEncodings -array 4
411
d141e2c @mathiasbynens .osx: Use a modified version of the Pro theme in Terminal.app
authored
412 # Use a modified version of the Pro theme by default in Terminal.app
413 open "$HOME/init/Mathias.terminal"
414 sleep 1 # Wait a bit to make sure the theme is loaded
415 defaults write com.apple.Terminal "Default Window Settings" -string "Mathias"
416 defaults write com.apple.Terminal "Startup Window Settings" -string "Mathias"
772506c @mathiasbynens .osx: Use the Pro theme by default in Terminal.app
authored
417
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
418 # Enable “focus follows mouse” for Terminal.app and all X11 apps
419 # This means you can hover over a window and start typing in it without clicking first
420 #defaults write com.apple.terminal FocusFollowsMouse -bool true
421 #defaults write org.x.X11 wm_ffm -bool true
422
423 ###############################################################################
424 # Time Machine #
425 ###############################################################################
7d02270 @mathiasbynens Initial commit.
authored
426
997cb32 @mathiasbynens .osx: Prevent Time Machine from prompting to use new hard drives as b…
authored
427 # Prevent Time Machine from prompting to use new hard drives as backup volume
428 defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
429
7d02270 @mathiasbynens Initial commit.
authored
430 # Disable local Time Machine backups
439e6f5 @mathiasbynens Check if `tmutil` is available before using it. (It’s not available o…
authored
431 hash tmutil &> /dev/null && sudo tmutil disablelocal
7d02270 @mathiasbynens Initial commit.
authored
432
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
433 ###############################################################################
050b7ca @mathiasbynens .osx: Add Twitter.app settings
authored
434 # Twitter.app #
435 ###############################################################################
436
437 # Disable smart quotes as it’s annoying for code tweets
438 defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false
439
440 # Show the app window when clicking the menu icon
441 defaults write com.twitter.twitter-mac MenuItemBehavior -int 1
442
443 # Enable the hidden ‘Develop’ menu
444 defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true
445
446 # Open links in the background
447 defaults write com.twitter.twitter-mac openLinksInBackground -bool true
448
449 # Allow closing the ‘new tweet’ window by pressing `Esc`
450 defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true
451
452 # Show full names rather than Twitter handles
453 defaults write com.twitter.twitter-mac ShowFullNames -bool true
454
455 # Hide the app in the background if it’s not the front-most window
456 defaults write com.twitter.twitter-mac HideInBackground -bool true
457
458 ###############################################################################
44ab4cf @mathiasbynens .osx: Group commands in categories
authored
459 # Kill affected applications #
460 ###############################################################################
59c2863 @mathiasbynens Remove the green checkmark icons in Dropbox.
authored
461
0b56246 @mathiasbynens .osx: Kill the affected applications by their new OS X 10.8 names as …
authored
462 for app in "Address Book" "Contacts" "iCal" "Calendar" "Dock" "Finder" "Mail" \
463 "Safari" "iTunes" "SystemUIServer" "Terminal" "Twitter"; do
6a42419 @mathiasbynens .osx: Minor formatting tweak
authored
464 killall "$app" > /dev/null 2>&1
465 done
7baa45c @mathiasbynens .osx: Clean up after commit 5b36bee8676dc8e800f68e3a559e102dcefcae36
authored
466 echo "Done. Note that some of these changes require a logout/restart to take effect."
Something went wrong with that request. Please try again.