Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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