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