Skip to content

HTTPS clone URL

Subversion checkout URL

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