Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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