Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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