Skip to content
Newer
Older
100755 437 lines (319 sloc) 20.5 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
a407d5d @mathiasbynens Add some more goodies to .osx.
authored Sep 7, 2011
108 # Disable press-and-hold for keys in favor of key repeat
f150692 @mathiasbynens Use `NSGlobalDomain` instead of `-g`.
authored Sep 20, 2011
109 defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
a407d5d @mathiasbynens Add some more goodies to .osx.
authored Sep 7, 2011
110
7c46342 @mathiasbynens Set a blazingly fast keyboard repeat rate.
authored Sep 23, 2011
111 # Set a blazingly fast keyboard repeat rate
112 defaults write NSGlobalDomain KeyRepeat -int 0
113
24045d9 @mathiasbynens .osx: Set language and text formats
authored Jun 26, 2012
114 # Set language and text formats
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
115 # Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
116 # `Inches`, and `true` with `false`.
24045d9 @mathiasbynens .osx: Set language and text formats
authored Jun 26, 2012
117 defaults write NSGlobalDomain AppleLanguages -array "en" "nl"
118 defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
119 defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
120 defaults write NSGlobalDomain AppleMetricUnits -bool true
121
1503abf @mathiasbynens .osx: Set the timezone
authored Aug 11, 2012
122 # Set the timezone; see `systemsetup -listtimezones` for other values
123 systemsetup -settimezone "Europe/Brussels"
124
a407d5d @mathiasbynens Add some more goodies to .osx.
authored Sep 7, 2011
125 # Disable auto-correct
126 defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
127
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
128 ###############################################################################
129 # Screen #
130 ###############################################################################
29ae35c @mathiasbynens .osx: Enable swipe between pages with three fingers
authored Jun 27, 2012
131
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
132 # Require password immediately after sleep or screen saver begins
133 defaults write com.apple.screensaver askForPassword -int 1
134 defaults write com.apple.screensaver askForPasswordDelay -int 0
135
7baa45c @mathiasbynens .osx: Clean up after commit 5b36bee
authored Apr 30, 2012
136 # Save screenshots to the desktop
137 defaults write com.apple.screencapture location -string "$HOME/Desktop"
138
139 # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
140 defaults write com.apple.screencapture type -string "png"
141
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
142 # Disable shadow in screenshots
143 defaults write com.apple.screencapture disable-shadow -bool true
144
145 # Enable subpixel font rendering on non-Apple LCDs
146 defaults write NSGlobalDomain AppleFontSmoothing -int 2
147
97a3318 @porada .osx: Enable HiDPI display modes without using Quartz Debug
porada authored Jul 29, 2012
148 # Enable HiDPI display modes (requires restart)
149 sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
150
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
151 ###############################################################################
152 # Finder #
153 ###############################################################################
154
155 # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
156 defaults write com.apple.finder QuitMenuItem -bool true
157
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
158 # Finder: disable window animations and Get Info animations
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
159 defaults write com.apple.finder DisableAllAnimations -bool true
160
e4d22ec @mathiasbynens .osx: Show icons for hard drives, servers, and removable media on the…
authored Jul 26, 2012
161 # Show icons for hard drives, servers, and removable media on the desktop
162 defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
163 defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
164 defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
165 defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
166
c53f222 @mathiasbynens .osx: Show hidden files by default in Finder
authored Jul 12, 2012
167 # Finder: show hidden files by default
168 defaults write com.apple.Finder AppleShowAllFiles -bool true
169
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
170 # Finder: show all filename extensions
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
171 defaults write NSGlobalDomain AppleShowAllExtensions -bool true
172
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
173 # Finder: show status bar
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
174 defaults write com.apple.finder ShowStatusBar -bool true
175
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
176 # Finder: allow text selection in Quick Look
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
177 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
178
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
179 # Display full POSIX path as Finder window title
180 defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
181
06c9e88 @mathiasbynens .osx: When performing a search, search the current folder by default …
authored Aug 12, 2012
182 # When performing a search, search the current folder by default
183 defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
184
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
185 # Disable the warning when changing a file extension
186 defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
187
188 # Avoid creating .DS_Store files on network volumes
189 defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
190
a407d5d @mathiasbynens Add some more goodies to .osx.
authored Sep 7, 2011
191 # Disable disk image verification
192 defaults write com.apple.frameworks.diskimages skip-verify -bool true
193 defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
194 defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
195
196 # Automatically open a new Finder window when a volume is mounted
197 defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
198 defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored Feb 24, 2012
199 defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
a407d5d @mathiasbynens Add some more goodies to .osx.
authored Sep 7, 2011
200
a168e93 @mathiasbynens .osx: Add more Finder settings for icons on the desktop and in icon v…
authored Jul 26, 2012
201 # 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
202 /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
203 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
204 /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
205
a168e93 @mathiasbynens .osx: Add more Finder settings for icons on the desktop and in icon v…
authored Jul 26, 2012
206 # 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
207 /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
208 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
209 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
210
211 # Increase grid spacing for icons on the desktop and in other icon views
212 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
213 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
214 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
215
216 # Increase the size of icons on the desktop and in other icon views
217 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
218 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
219 /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
220
755584e @mathiasbynens .osx: Use list view in all Finder windows by default
authored Aug 8, 2012
221 # Use list view in all Finder windows by default
222 # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
223 defaults write com.apple.Finder FXPreferredViewStyle -string "Nlsv"
224
df46055 @mathiasbynens Disable the warning before emptying the Trash.
authored Sep 23, 2011
225 # Disable the warning before emptying the Trash
226 defaults write com.apple.finder WarnOnEmptyTrash -bool false
227
51fba19 @mathiasbynens Empty Trash securely by default.
authored Sep 23, 2011
228 # Empty Trash securely by default
229 defaults write com.apple.finder EmptyTrashSecurely -bool true
230
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
231 # Enable AirDrop over Ethernet and on unsupported Macs running Lion
232 defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
b8fbd68 @mathiasbynens Require password immediately after sleep or screen saver begins. (Can…
authored Sep 21, 2011
233
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
234 # Show the ~/Library folder
235 chflags nohidden ~/Library
50c583f @mathiasbynens Enable tap to click (Trackpad).
authored Sep 23, 2011
236
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
237 # Remove Dropbox’s green checkmark icons in Finder
238 file=/Applications/Dropbox.app/Contents/Resources/check.icns
239 [ -e "$file" ] && mv -f "$file" "$file.bak"
240 unset file
241
242 ###############################################################################
243 # Dock & hot corners #
244 ###############################################################################
6e45fac @mathiasbynens .osx: Add hot corners
authored Apr 10, 2012
245
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
246 # Enable highlight hover effect for the grid view of a stack (Dock)
247 defaults write com.apple.dock mouse-over-hilte-stack -bool true
248
9898899 @mathiasbynens .osx: Set the icon size of Dock items to 36 pixels
authored Apr 30, 2012
249 # Set the icon size of Dock items to 36 pixels
250 defaults write com.apple.dock tilesize -int 36
c8e40aa Icon size of 48 pixels for dock items
Cedric Kastner authored Apr 26, 2012
251
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
252 # Enable spring loading for all Dock items
253 defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
254
255 # Show indicator lights for open applications in the Dock
256 defaults write com.apple.dock show-process-indicators -bool true
257
258 # Don’t animate opening applications from the Dock
259 defaults write com.apple.dock launchanim -bool false
260
22ecf0a @mathiasbynens .osx: Speed up Mission Control animations
authored Jun 27, 2012
261 # Speed up Mission Control animations
262 defaults write com.apple.dock expose-animation-duration -float 0.1
263
9c934b8 @mathiasbynens .osx: Don’t group windows by application in Mission Control
authored Jul 31, 2012
264 # Don’t group windows by application in Mission Control
265 # (i.e. use the old Exposé behavior instead)
266 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
267
205b8b1 @mathiasbynens .osx: Don’t show Dashboard as a Space
authored Jul 27, 2012
268 # Don’t show Dashboard as a Space
269 defaults write com.apple.dock "dashboard-in-overlay" -bool true
270
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
271 # Remove the auto-hiding Dock delay
272 defaults write com.apple.Dock autohide-delay -float 0
4623943 @mathiasbynens .osx: Cleanup
authored Apr 10, 2012
273 # Remove the animation when hiding/showing the Dock
274 defaults write com.apple.dock autohide-time-modifier -float 0
f60e3e6 @nimbling # Shorten Dock show animation speed
nimbling authored Apr 10, 2012
275
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
276 # Enable the 2D Dock
2d0737e @mathiasbynens .osx: Comment out the line that enables the 2D Dock
authored Jul 26, 2012
277 #defaults write com.apple.dock no-glass -bool true
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
278
279 # Automatically hide and show the Dock
280 defaults write com.apple.dock autohide -bool true
281
282 # Make Dock icons of hidden applications translucent
283 defaults write com.apple.dock showhidden -bool true
284
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
285 # Reset Launchpad
286 find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete
287
61163c8 @mathiasbynens .osx: Group commands by type
authored Apr 10, 2012
288 # Add a spacer to the left side of the Dock (where the applications are)
289 #defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
290 # Add a spacer to the right side of the Dock (where the Trash is)
291 #defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'
292
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
293 # Hot corners
294 # Top left screen corner → Mission Control
295 defaults write com.apple.dock wvous-tl-corner -int 2
296 defaults write com.apple.dock wvous-tl-modifier -int 0
297 # Top right screen corner → Desktop
298 defaults write com.apple.dock wvous-tr-corner -int 4
299 defaults write com.apple.dock wvous-tr-modifier -int 0
300 # Bottom left screen corner → Start screen saver
301 defaults write com.apple.dock wvous-bl-corner -int 5
302 defaults write com.apple.dock wvous-bl-modifier -int 0
303
304 ###############################################################################
305 # Safari & WebKit #
306 ###############################################################################
1ab9402 @mathiasbynens Map bottom right Trackpad corner to secondary click (right-click).
authored Sep 21, 2011
307
f2975b1 @mathiasbynens .osx: Allow hitting the Backspace key to go to the previous page in S…
authored Jul 30, 2012
308 # Allow hitting the Backspace key to go to the previous page in history
309 defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true
310
390d0fd @mathiasbynens .osx: Hide Safari’s bookmarks bar by default
authored Jul 27, 2012
311 # Hide Safari’s bookmarks bar by default
312 defaults write com.apple.Safari ShowFavoritesBar -bool false
313
7d02270 @mathiasbynens Initial commit.
authored Sep 5, 2011
314 # Disable Safari’s thumbnail cache for History and Top Sites
315 defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
316
558b2c4 @mathiasbynens Enable Safari’s debug menu.
authored Sep 8, 2011
317 # Enable Safari’s debug menu
fc439ad @mathiasbynens Looks like `IncludeDebugMenu` was replaced by `IncludeInternalDebugMe…
authored Oct 19, 2011
318 defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
558b2c4 @mathiasbynens Enable Safari’s debug menu.
authored Sep 8, 2011
319
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored Feb 24, 2012
320 # Make Safari’s search banners default to Contains instead of Starts With
321 defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
322
7d02270 @mathiasbynens Initial commit.
authored Sep 5, 2011
323 # Remove useless icons from Safari’s bookmarks bar
324 defaults write com.apple.Safari ProxiesInBookmarksBar "()"
325
93bb039 @mathiasbynens .osx: Enable the Develop Menu and the Web Inspector in Safari
authored Jul 28, 2012
326 # Enable the Develop menu and the Web Inspector in Safari
327 defaults write com.apple.Safari IncludeDevelopMenu -bool true
328 defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
329 defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true
330
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored Feb 24, 2012
331 # Add a context menu item for showing the Web Inspector in web views
332 defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
72860be @mathiasbynens .osx: Enable the debug menu in iCal and Address Book
authored Apr 3, 2012
333
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
334 ###############################################################################
45676de @mathiasbynens .osx: Enable the debug menu in Disk Utility
authored Jun 27, 2012
335 # Address Book, Dashboard, iCal, iTunes, Mail, and Disk Utility #
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
336 ###############################################################################
337
72860be @mathiasbynens .osx: Enable the debug menu in iCal and Address Book
authored Apr 3, 2012
338 # Enable the debug menu in Address Book
339 defaults write com.apple.addressbook ABShowDebugMenu -bool true
340
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
341 # Enable Dashboard dev mode (allows keeping widgets on the desktop)
342 defaults write com.apple.dashboard devmode -bool true
343
064fa96 @mathiasbynens .osx: Add a note saying that the iCal debug menu tweak doesn’t work i…
authored Aug 6, 2012
344 # 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
345 defaults write com.apple.iCal IncludeDebugMenu -bool true
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored Feb 24, 2012
346
03f1e47 @mathiasbynens .osx: Update some iTunes tweaks to work with iTunes 10.6.3
authored Aug 6, 2012
347 # Disable the iTunes store link arrows
348 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
349
17c5050 @mathiasbynens Disable the Ping sidebar in iTunes.
authored Sep 24, 2011
350 # Disable the Ping sidebar in iTunes
351 defaults write com.apple.iTunes disablePingSidebar -bool true
352
36c4597 @mathiasbynens Disable Ping entirely.
authored Sep 24, 2011
353 # Disable all the other Ping stuff in iTunes
354 defaults write com.apple.iTunes disablePing -bool true
355
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored Feb 24, 2012
356 # 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
357 # To use these commands in another language, browse iTunes’s package contents,
358 # 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
359 # for `kHiddenMenuItemTargetSearch`.
4c0198f @mathiasbynens .osx: Tweak some more hidden preferences
authored Feb 24, 2012
360 defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
361
a407d5d @mathiasbynens Add some more goodies to .osx.
authored Sep 7, 2011
362 # Disable send and reply animations in Mail.app
363 defaults write com.apple.Mail DisableReplyAnimations -bool true
364 defaults write com.apple.Mail DisableSendAnimations -bool true
7d02270 @mathiasbynens Initial commit.
authored Sep 5, 2011
365
42f7f7b @mathiasbynens .osx: Copy email addresses as `foo@example.com` instead of `Foo Bar <…
authored Mar 31, 2012
366 # Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
367 defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
368
4267ea9 @mathiasbynens .osx: Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
authored Aug 2, 2012
369 # Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
370 defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9"
371
45676de @mathiasbynens .osx: Enable the debug menu in Disk Utility
authored Jun 27, 2012
372 # Enable the debug menu in Disk Utility
373 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
374 defaults write com.apple.DiskUtility advanced-image-options -bool true
45676de @mathiasbynens .osx: Enable the debug menu in Disk Utility
authored Jun 27, 2012
375
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
376 ###############################################################################
377 # Terminal #
378 ###############################################################################
5be688e @jpsirois Remove the disturbing ".dmg" Mounting Verification
jpsirois authored Sep 6, 2011
379
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
380 # Only use UTF-8 in Terminal.app
381 defaults write com.apple.terminal StringEncodings -array 4
382
d141e2c @mathiasbynens .osx: Use a modified version of the Pro theme in Terminal.app
authored Jul 30, 2012
383 # Use a modified version of the Pro theme by default in Terminal.app
384 open "$HOME/init/Mathias.terminal"
385 sleep 1 # Wait a bit to make sure the theme is loaded
386 defaults write com.apple.Terminal "Default Window Settings" -string "Mathias"
387 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
388
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
389 # Enable “focus follows mouse” for Terminal.app and all X11 apps
390 # This means you can hover over a window and start typing in it without clicking first
391 #defaults write com.apple.terminal FocusFollowsMouse -bool true
392 #defaults write org.x.X11 wm_ffm -bool true
393
394 ###############################################################################
395 # Time Machine #
396 ###############################################################################
7d02270 @mathiasbynens Initial commit.
authored Sep 5, 2011
397
997cb32 @mathiasbynens .osx: Prevent Time Machine from prompting to use new hard drives as b…
authored Apr 12, 2012
398 # Prevent Time Machine from prompting to use new hard drives as backup volume
399 defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
400
7d02270 @mathiasbynens Initial commit.
authored Sep 5, 2011
401 # Disable local Time Machine backups
439e6f5 @mathiasbynens Check if `tmutil` is available before using it. (It’s not available o…
authored Sep 24, 2011
402 hash tmutil &> /dev/null && sudo tmutil disablelocal
7d02270 @mathiasbynens Initial commit.
authored Sep 5, 2011
403
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
404 ###############################################################################
050b7ca @mathiasbynens .osx: Add Twitter.app settings
authored Jul 26, 2012
405 # Twitter.app #
406 ###############################################################################
407
408 # Disable smart quotes as it’s annoying for code tweets
409 defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false
410
411 # Show the app window when clicking the menu icon
412 defaults write com.twitter.twitter-mac MenuItemBehavior -int 1
413
414 # Enable the hidden ‘Develop’ menu
415 defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true
416
417 # Open links in the background
418 defaults write com.twitter.twitter-mac openLinksInBackground -bool true
419
420 # Allow closing the ‘new tweet’ window by pressing `Esc`
421 defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true
422
423 # Show full names rather than Twitter handles
424 defaults write com.twitter.twitter-mac ShowFullNames -bool true
425
426 # Hide the app in the background if it’s not the front-most window
427 defaults write com.twitter.twitter-mac HideInBackground -bool true
428
429 ###############################################################################
44ab4cf @mathiasbynens .osx: Group commands in categories
authored Jun 27, 2012
430 # Kill affected applications #
431 ###############################################################################
59c2863 @mathiasbynens Remove the green checkmark icons in Dropbox.
authored Oct 22, 2011
432
0b56246 @mathiasbynens .osx: Kill the affected applications by their new OS X 10.8 names as …
authored Aug 3, 2012
433 for app in "Address Book" "Contacts" "iCal" "Calendar" "Dock" "Finder" "Mail" \
434 "Safari" "iTunes" "SystemUIServer" "Terminal" "Twitter"; do
6a42419 @mathiasbynens .osx: Minor formatting tweak
authored Jun 27, 2012
435 killall "$app" > /dev/null 2>&1
436 done
7baa45c @mathiasbynens .osx: Clean up after commit 5b36bee
authored Apr 30, 2012
437 echo "Done. Note that some of these changes require a logout/restart to take effect."
Something went wrong with that request. Please try again.