Skip to content
This repository
Newer
Older
100755 516 lines (377 sloc) 24.574 kb
96c26960 »
2012-08-03 .osx: Ask for the administrator password upfront
1 #!/bin/bash
2
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
3 # ~/.osx — http://mths.be/osx
4
96c26960 »
2012-08-03 .osx: Ask for the administrator password upfront
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
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
11 ###############################################################################
12 # General UI/UX #
13 ###############################################################################
14
fc196655 »
2012-07-27 .osx: Set computer name
15 # Set computer name (as done via System Preferences → Sharing)
96c26960 »
2012-08-03 .osx: Ask for the administrator password upfront
16 sudo scutil --set ComputerName "MathBook Pro"
17 sudo scutil --set HostName "MathBook Pro"
18 sudo scutil --set LocalHostName "MathBook-Pro"
65857d0c »
2012-08-13 .osx: Use `sudo` to set the NetBIOS name
19 sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "MathBook-Pro"
fc196655 »
2012-07-27 .osx: Set computer name
20
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
21 # Menu bar: disable transparency
f1506922 »
2011-09-20 Use `NSGlobalDomain` instead of `-g`.
22 defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
7d022705 »
2011-09-05 Initial commit.
23
fc196655 »
2012-07-27 .osx: Set computer name
24 # Menu bar: show remaining battery time (on pre-10.8); hide percentage
91918d76 »
2011-09-23 Show remaining battery time; hide percentage.
25 defaults write com.apple.menuextra.battery ShowPercent -string "NO"
26 defaults write com.apple.menuextra.battery ShowTime -string "YES"
27
4e31acd0 »
2012-07-26 .osx: Hide the useless Time Machine and Volume icons
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
45806ef8 »
2011-09-20 Always show scrollbars.
31 # Always show scrollbars
32 defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
33
3d4c417a »
2012-07-29 .osx: Add commented out command to disable smooth scrolling
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
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
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
7d022705 »
2011-09-05 Initial commit.
44 # Expand save panel by default
f1506922 »
2011-09-20 Use `NSGlobalDomain` instead of `-g`.
45 defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
7d022705 »
2011-09-05 Initial commit.
46
47 # Expand print panel by default
f1506922 »
2011-09-20 Use `NSGlobalDomain` instead of `-g`.
48 defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
7d022705 »
2011-09-05 Initial commit.
49
67a29767 »
2012-08-13 .osx: Automatically quit printer app once the print jobs complete
50 # Automatically quit printer app once the print jobs complete
51 defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
52
cdbb059f »
2011-09-20 Disable the “Are you sure you want to open this application?” dialog.
53 # Disable the “Are you sure you want to open this application?” dialog
54 defaults write com.apple.LaunchServices LSQuarantine -bool false
55
61163c8a »
2012-04-10 .osx: Group commands by type
56 # Display ASCII control characters using caret notation in standard text views
57 # Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`
58 defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
7d022705 »
2011-09-05 Initial commit.
59
61163c8a »
2012-04-10 .osx: Group commands by type
60 # Disable Resume system-wide
61 defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
6b3819f1 »
2011-09-20 Show indicator lights for open applications in the Dock, and don’t an…
62
5b4e9d13 »
2012-06-27 .osx: Disable automatic termination of inactive apps
63 # Disable automatic termination of inactive apps
64 defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
65
7c0bd4cd »
2012-08-13 .osx: Disable the crash reporter (commented)
66 # Disable the crash reporter
67 #defaults write com.apple.CrashReporter DialogType -string 'none'
68
29f6c9f1 »
2012-08-13 .osx: Set Help Viewer windows to non-floating mode
69 # Set Help Viewer windows to non-floating mode
70 defaults write com.apple.helpviewer DevMode -bool true
71
61163c8a »
2012-04-10 .osx: Group commands by type
72 # Fix for the ancient UTF-8 bug in QuickLook (http://mths.be/bbo)
7bbbe8dd »
2012-08-02 .osx: Reveal IP address, hostname, OS version, etc. when clicking the…
73 # Commented out, as this is known to cause problems when saving files in
74 # Adobe Illustrator CS5 :(
61163c8a »
2012-04-10 .osx: Group commands by type
75 #echo "0x08000100:0" > ~/.CFUserTextEncoding
7134df85 »
2012-04-02 .osx: Remove the auto-hiding Dock delay
76
7bbbe8dd »
2012-08-02 .osx: Reveal IP address, hostname, OS version, etc. when clicking the…
77 # Reveal IP address, hostname, OS version, etc. when clicking the clock
78 # in the login window
79 sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
80
41431ac7 »
2012-08-13 .osx: Add energy saver preferences
81 # Restart automatically if the computer freezes
82 systemsetup -setrestartfreeze on
83
84 # Never go into computer sleep mode
85 systemsetup -setcomputersleep Off > /dev/null
86
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
87 ###############################################################################
95ed1a16 »
2012-07-18 .osx: Increase sound quality for Bluetooth headphones/headsets
88 # Trackpad, mouse, keyboard, Bluetooth accessories, and input #
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
89 ###############################################################################
61163c8a »
2012-04-10 .osx: Group commands by type
90
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
91 # Trackpad: enable tap to click for this user and for the login screen
92 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
93 defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
94 defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
95
96 # Trackpad: map bottom right corner to right-click
97 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
98 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
99 defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
100 defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
101
102 # Trackpad: swipe between pages with three fingers
f0ac6582 »
2012-06-28 .osx: Explicitly enable swipe between pages
103 defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool true
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
104 defaults -currentHost write NSGlobalDomain com.apple.trackpad.threeFingerHorizSwipeGesture -int 1
105 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerHorizSwipeGesture -int 1
106
6a424194 »
2012-06-27 .osx: Minor formatting tweak
107 # Disable “natural” (Lion-style) scrolling
108 defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
109
95ed1a16 »
2012-07-18 .osx: Increase sound quality for Bluetooth headphones/headsets
110 # Increase sound quality for Bluetooth headphones/headsets
111 defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
112
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
113 # Enable full keyboard access for all controls
114 # (e.g. enable Tab in modal dialogs)
115 defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
116
b9fa939c »
2012-08-12 .osx: Enable access for assistive devices
117 # Enable access for assistive devices
118 echo -n 'a' | sudo tee /private/var/db/.AccessibilityAPIEnabled > /dev/null 2>&1
119 sudo chmod 444 /private/var/db/.AccessibilityAPIEnabled
120 # TODO: avoid GUI password prompt somehow (http://apple.stackexchange.com/q/60476/4408)
121 #sudo osascript -e 'tell application "System Events" to set UI elements enabled to true'
122
76b752d5 »
2012-08-12 .osx: Enable scroll to zoom
123 # Use scroll gesture with the Ctrl (^) modifier key to zoom
124 defaults write com.apple.universalaccess 'closeViewScrollWheelToggle' -bool true
125 defaults write com.apple.universalaccess 'HIDScrollZoomModifierMask' -int 262144
126 # Follow the keyboard focus while zoomed in
127 defaults write com.apple.universalaccess 'closeViewZoomFollowsFocus' -bool true
128
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
129 # Disable press-and-hold for keys in favor of key repeat
f1506922 »
2011-09-20 Use `NSGlobalDomain` instead of `-g`.
130 defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
131
7c463423 »
2011-09-23 Set a blazingly fast keyboard repeat rate.
132 # Set a blazingly fast keyboard repeat rate
133 defaults write NSGlobalDomain KeyRepeat -int 0
134
9cf19781 »
2012-08-12 .osx: Automatically illuminate built-in MacBook keyboard in low light
135 # Automatically illuminate built-in MacBook keyboard in low light
136 defaults write com.apple.BezelServices 'kDim' -bool true
137 # Turn off keyboard illumination when computer is not used for 5 minutes
138 defaults write com.apple.BezelServices 'kDimTime' -int 300
139
24045d9f »
2012-06-26 .osx: Set language and text formats
140 # Set language and text formats
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
141 # Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
142 # `Inches`, and `true` with `false`.
24045d9f »
2012-06-26 .osx: Set language and text formats
143 defaults write NSGlobalDomain AppleLanguages -array "en" "nl"
144 defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
145 defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
146 defaults write NSGlobalDomain AppleMetricUnits -bool true
147
1503abf1 »
2012-08-11 .osx: Set the timezone
148 # Set the timezone; see `systemsetup -listtimezones` for other values
dd742bf1 »
2012-08-13 .osx: Hide `systemsetup` output when setting the timezone
149 systemsetup -settimezone "Europe/Brussels" > /dev/null
1503abf1 »
2012-08-11 .osx: Set the timezone
150
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
151 # Disable auto-correct
152 defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
153
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
154 ###############################################################################
155 # Screen #
156 ###############################################################################
29ae35c5 »
2012-06-27 .osx: Enable swipe between pages with three fingers
157
61163c8a »
2012-04-10 .osx: Group commands by type
158 # Require password immediately after sleep or screen saver begins
159 defaults write com.apple.screensaver askForPassword -int 1
160 defaults write com.apple.screensaver askForPasswordDelay -int 0
161
7baa45cc »
2012-04-30 .osx: Clean up after commit 5b36bee
162 # Save screenshots to the desktop
163 defaults write com.apple.screencapture location -string "$HOME/Desktop"
164
165 # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
166 defaults write com.apple.screencapture type -string "png"
167
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
168 # Disable shadow in screenshots
169 defaults write com.apple.screencapture disable-shadow -bool true
170
171 # Enable subpixel font rendering on non-Apple LCDs
172 defaults write NSGlobalDomain AppleFontSmoothing -int 2
173
97a33183 » porada
2012-07-29 .osx: Enable HiDPI display modes without using Quartz Debug
174 # Enable HiDPI display modes (requires restart)
175 sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
176
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
177 ###############################################################################
178 # Finder #
179 ###############################################################################
180
181 # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
61163c8a »
2012-04-10 .osx: Group commands by type
182 defaults write com.apple.finder QuitMenuItem -bool true
183
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
184 # Finder: disable window animations and Get Info animations
61163c8a »
2012-04-10 .osx: Group commands by type
185 defaults write com.apple.finder DisableAllAnimations -bool true
186
e4d22ec5 »
2012-07-26 .osx: Show icons for hard drives, servers, and removable media on the…
187 # Show icons for hard drives, servers, and removable media on the desktop
188 defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
189 defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
190 defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
191 defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
192
c53f2223 »
2012-07-12 .osx: Show hidden files by default in Finder
193 # Finder: show hidden files by default
194 defaults write com.apple.Finder AppleShowAllFiles -bool true
195
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
196 # Finder: show all filename extensions
61163c8a »
2012-04-10 .osx: Group commands by type
197 defaults write NSGlobalDomain AppleShowAllExtensions -bool true
198
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
199 # Finder: show status bar
61163c8a »
2012-04-10 .osx: Group commands by type
200 defaults write com.apple.finder ShowStatusBar -bool true
201
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
202 # Finder: allow text selection in Quick Look
61163c8a »
2012-04-10 .osx: Group commands by type
203 defaults write com.apple.finder QLEnableTextSelection -bool true
2433b1bb »
2011-09-20 Enable AirDrop over Ethernet and on unsupported Macs running OS X Lion.
204
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
205 # Display full POSIX path as Finder window title
206 defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
207
06c9e889 »
2012-08-12 .osx: When performing a search, search the current folder by default …
208 # When performing a search, search the current folder by default
209 defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
210
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
211 # Disable the warning when changing a file extension
212 defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
213
214 # Avoid creating .DS_Store files on network volumes
215 defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
216
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
217 # Disable disk image verification
218 defaults write com.apple.frameworks.diskimages skip-verify -bool true
219 defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
220 defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
221
222 # Automatically open a new Finder window when a volume is mounted
223 defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
224 defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
225 defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
226
a168e937 »
2012-07-26 .osx: Add more Finder settings for icons on the desktop and in icon v…
227 # Show item info below icons on the desktop and in other icon views
ba9b8b8a »
2011-09-24 Use full PlistBuddy path instead of the alias, so `.osx` can be used …
228 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
a168e937 »
2012-07-26 .osx: Add more Finder settings for icons on the desktop and in icon v…
229 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
230 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
9bb2dcef »
2011-09-24 Show item info below desktop icons.
231
a168e937 »
2012-07-26 .osx: Add more Finder settings for icons on the desktop and in icon v…
232 # Enable snap-to-grid for icons on the desktop and in other icon views
dda45e2c »
2012-02-22 .osx: Enable snap-to-grid for desktop icons
233 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
a168e937 »
2012-07-26 .osx: Add more Finder settings for icons on the desktop and in icon v…
234 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
235 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
236
237 # Increase grid spacing for icons on the desktop and in other icon views
238 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
239 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
240 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
241
242 # Increase the size of icons on the desktop and in other icon views
243 /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
244 /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
245 /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
dda45e2c »
2012-02-22 .osx: Enable snap-to-grid for desktop icons
246
755584e3 »
2012-08-08 .osx: Use list view in all Finder windows by default
247 # Use list view in all Finder windows by default
248 # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
249 defaults write com.apple.Finder FXPreferredViewStyle -string "Nlsv"
250
df460553 »
2011-09-23 Disable the warning before emptying the Trash.
251 # Disable the warning before emptying the Trash
252 defaults write com.apple.finder WarnOnEmptyTrash -bool false
253
51fba19b »
2011-09-23 Empty Trash securely by default.
254 # Empty Trash securely by default
255 defaults write com.apple.finder EmptyTrashSecurely -bool true
256
61163c8a »
2012-04-10 .osx: Group commands by type
257 # Enable AirDrop over Ethernet and on unsupported Macs running Lion
258 defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
b8fbd682 »
2011-09-21 Require password immediately after sleep or screen saver begins. (Can…
259
61163c8a »
2012-04-10 .osx: Group commands by type
260 # Show the ~/Library folder
261 chflags nohidden ~/Library
50c583f8 »
2011-09-23 Enable tap to click (Trackpad).
262
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
263 # Remove Dropbox’s green checkmark icons in Finder
264 file=/Applications/Dropbox.app/Contents/Resources/check.icns
265 [ -e "$file" ] && mv -f "$file" "$file.bak"
266 unset file
267
268 ###############################################################################
269 # Dock & hot corners #
270 ###############################################################################
6e45face »
2012-04-10 .osx: Add hot corners
271
61163c8a »
2012-04-10 .osx: Group commands by type
272 # Enable highlight hover effect for the grid view of a stack (Dock)
273 defaults write com.apple.dock mouse-over-hilte-stack -bool true
274
9898899c »
2012-04-30 .osx: Set the icon size of Dock items to 36 pixels
275 # Set the icon size of Dock items to 36 pixels
276 defaults write com.apple.dock tilesize -int 36
c8e40aa9 » Cedric Kastner
2012-04-26 Icon size of 48 pixels for dock items
277
61163c8a »
2012-04-10 .osx: Group commands by type
278 # Enable spring loading for all Dock items
279 defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
280
281 # Show indicator lights for open applications in the Dock
282 defaults write com.apple.dock show-process-indicators -bool true
283
284 # Don’t animate opening applications from the Dock
285 defaults write com.apple.dock launchanim -bool false
286
22ecf0a3 »
2012-06-27 .osx: Speed up Mission Control animations
287 # Speed up Mission Control animations
288 defaults write com.apple.dock expose-animation-duration -float 0.1
289
9c934b83 »
2012-07-31 .osx: Don’t group windows by application in Mission Control
290 # Don’t group windows by application in Mission Control
291 # (i.e. use the old Exposé behavior instead)
292 defaults write com.apple.dock "expose-group-by-app" -bool false
66911ae4 »
2012-07-27 .osx: Group windows by application in Mission Control
293
205b8b14 »
2012-07-27 .osx: Don’t show Dashboard as a Space
294 # Don’t show Dashboard as a Space
295 defaults write com.apple.dock "dashboard-in-overlay" -bool true
296
61163c8a »
2012-04-10 .osx: Group commands by type
297 # Remove the auto-hiding Dock delay
298 defaults write com.apple.Dock autohide-delay -float 0
4623943f »
2012-04-10 .osx: Cleanup
299 # Remove the animation when hiding/showing the Dock
300 defaults write com.apple.dock autohide-time-modifier -float 0
f60e3e64 » fruityth1ng
2012-04-10 # Shorten Dock show animation speed
301
61163c8a »
2012-04-10 .osx: Group commands by type
302 # Enable the 2D Dock
2d0737e9 »
2012-07-26 .osx: Comment out the line that enables the 2D Dock
303 #defaults write com.apple.dock no-glass -bool true
61163c8a »
2012-04-10 .osx: Group commands by type
304
305 # Automatically hide and show the Dock
306 defaults write com.apple.dock autohide -bool true
307
308 # Make Dock icons of hidden applications translucent
309 defaults write com.apple.dock showhidden -bool true
310
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
311 # Reset Launchpad
312 find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete
313
61163c8a »
2012-04-10 .osx: Group commands by type
314 # Add a spacer to the left side of the Dock (where the applications are)
315 #defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
316 # Add a spacer to the right side of the Dock (where the Trash is)
317 #defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'
318
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
319 # Hot corners
320 # Top left screen corner → Mission Control
321 defaults write com.apple.dock wvous-tl-corner -int 2
322 defaults write com.apple.dock wvous-tl-modifier -int 0
323 # Top right screen corner → Desktop
324 defaults write com.apple.dock wvous-tr-corner -int 4
325 defaults write com.apple.dock wvous-tr-modifier -int 0
326 # Bottom left screen corner → Start screen saver
327 defaults write com.apple.dock wvous-bl-corner -int 5
328 defaults write com.apple.dock wvous-bl-modifier -int 0
329
330 ###############################################################################
331 # Safari & WebKit #
332 ###############################################################################
1ab9402e »
2011-09-21 Map bottom right Trackpad corner to secondary click (right-click).
333
b912e0bb »
2012-08-13 .osx: Set Safari’s home page to `about:blank`
334 # Set Safari’s home page to `about:blank` for faster loading
335 defaults write com.apple.Safari HomePage -string "about:blank"
336
f2975b1b »
2012-07-30 .osx: Allow hitting the Backspace key to go to the previous page in S…
337 # Allow hitting the Backspace key to go to the previous page in history
338 defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true
339
390d0fd6 »
2012-07-27 .osx: Hide Safari’s bookmarks bar by default
340 # Hide Safari’s bookmarks bar by default
341 defaults write com.apple.Safari ShowFavoritesBar -bool false
342
7d022705 »
2011-09-05 Initial commit.
343 # Disable Safari’s thumbnail cache for History and Top Sites
344 defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
345
558b2c46 »
2011-09-08 Enable Safari’s debug menu.
346 # Enable Safari’s debug menu
fc439ad5 »
2011-10-19 Looks like `IncludeDebugMenu` was replaced by `IncludeInternalDebugMe…
347 defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
558b2c46 »
2011-09-08 Enable Safari’s debug menu.
348
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
349 # Make Safari’s search banners default to Contains instead of Starts With
350 defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
351
7d022705 »
2011-09-05 Initial commit.
352 # Remove useless icons from Safari’s bookmarks bar
353 defaults write com.apple.Safari ProxiesInBookmarksBar "()"
354
93bb0392 »
2012-07-28 .osx: Enable the Develop Menu and the Web Inspector in Safari
355 # Enable the Develop menu and the Web Inspector in Safari
356 defaults write com.apple.Safari IncludeDevelopMenu -bool true
357 defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
358 defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true
359
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
360 # Add a context menu item for showing the Web Inspector in web views
361 defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
72860bec »
2012-04-03 .osx: Enable the debug menu in iCal and Address Book
362
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
363 ###############################################################################
4c6cc924 »
2012-08-13 .osx: Improve categorization
364 # iTunes #
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
365 ###############################################################################
366
03f1e47c »
2012-08-06 .osx: Update some iTunes tweaks to work with iTunes 10.6.3
367 # Disable the iTunes store link arrows
368 defaults write com.apple.iTunes show-store-link-arrows -bool false
6c2be0e0 » kevinlawler
2012-07-01 .osx: Make iTunes arrows go to your library by default (rather than t…
369
4a7598cc »
2012-08-13 .osx: Disable the Genius sidebar in iTunes
370 # Disable the Genius sidebar in iTunes
371 defaults write com.apple.iTunes disableGeniusSidebar -bool true
372
17c5050f »
2011-09-24 Disable the Ping sidebar in iTunes.
373 # Disable the Ping sidebar in iTunes
374 defaults write com.apple.iTunes disablePingSidebar -bool true
375
36c45978 »
2011-09-24 Disable Ping entirely.
376 # Disable all the other Ping stuff in iTunes
377 defaults write com.apple.iTunes disablePing -bool true
378
6f89f05e »
2012-08-13 .osx: Disable radio stations in iTunes
379 # Disable radio stations in iTunes
380 defaults write com.apple.iTunes disableRadio -bool true
381
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
382 # Make ⌘ + F focus the search input in iTunes
7d9a9f2e »
2012-08-01 .osx: Explain how to use the ⌘ + F iTunes hack with other system lang…
383 # To use these commands in another language, browse iTunes’s package contents,
384 # open `Contents/Resources/your-language.lproj/Localizable.strings`, and look
4267ea95 »
2012-08-02 .osx: Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
385 # for `kHiddenMenuItemTargetSearch`.
4c0198f0 »
2012-02-24 .osx: Tweak some more hidden preferences
386 defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
387
4c6cc924 »
2012-08-13 .osx: Improve categorization
388 ###############################################################################
389 # Mail #
390 ###############################################################################
391
a407d5d3 »
2011-09-07 Add some more goodies to .osx.
392 # Disable send and reply animations in Mail.app
393 defaults write com.apple.Mail DisableReplyAnimations -bool true
394 defaults write com.apple.Mail DisableSendAnimations -bool true
7d022705 »
2011-09-05 Initial commit.
395
42f7f7be »
2012-03-31 .osx: Copy email addresses as `foo@example.com` instead of `Foo Bar <…
396 # Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
397 defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
398
4267ea95 »
2012-08-02 .osx: Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
399 # Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
400 defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9"
401
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
402 ###############################################################################
403 # Terminal #
404 ###############################################################################
5be688e0 » jpsirois
2011-09-06 Remove the disturbing ".dmg" Mounting Verification
405
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
406 # Only use UTF-8 in Terminal.app
407 defaults write com.apple.terminal StringEncodings -array 4
408
d141e2ca »
2012-07-30 .osx: Use a modified version of the Pro theme in Terminal.app
409 # Use a modified version of the Pro theme by default in Terminal.app
410 open "$HOME/init/Mathias.terminal"
411 sleep 1 # Wait a bit to make sure the theme is loaded
412 defaults write com.apple.Terminal "Default Window Settings" -string "Mathias"
413 defaults write com.apple.Terminal "Startup Window Settings" -string "Mathias"
772506ca »
2012-07-27 .osx: Use the Pro theme by default in Terminal.app
414
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
415 # Enable “focus follows mouse” for Terminal.app and all X11 apps
4c6cc924 »
2012-08-13 .osx: Improve categorization
416 # i.e. hover over a window and start typing in it without clicking first
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
417 #defaults write com.apple.terminal FocusFollowsMouse -bool true
418 #defaults write org.x.X11 wm_ffm -bool true
419
420 ###############################################################################
421 # Time Machine #
422 ###############################################################################
7d022705 »
2011-09-05 Initial commit.
423
997cb325 »
2012-04-12 .osx: Prevent Time Machine from prompting to use new hard drives as b…
424 # Prevent Time Machine from prompting to use new hard drives as backup volume
425 defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
426
7d022705 »
2011-09-05 Initial commit.
427 # Disable local Time Machine backups
439e6f5a »
2011-09-24 Check if `tmutil` is available before using it. (It’s not available o…
428 hash tmutil &> /dev/null && sudo tmutil disablelocal
7d022705 »
2011-09-05 Initial commit.
429
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
430 ###############################################################################
4c6cc924 »
2012-08-13 .osx: Improve categorization
431 # Address Book, Dashboard, iCal, TextEdit, and Disk Utility #
432 ###############################################################################
433
434 # Enable the debug menu in Address Book
435 defaults write com.apple.addressbook ABShowDebugMenu -bool true
436
437 # Enable Dashboard dev mode (allows keeping widgets on the desktop)
438 defaults write com.apple.dashboard devmode -bool true
439
440 # Enable the debug menu in iCal (pre-10.8)
441 defaults write com.apple.iCal IncludeDebugMenu -bool true
442
443 # Use plain text mode for new TextEdit documents
444 defaults write com.apple.TextEdit RichText -int 0
445 # Open and save files as UTF-8 in TextEdit
446 defaults write com.apple.TextEdit PlainTextEncoding -int 4
447 defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
448
449 # Enable the debug menu in Disk Utility
450 defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
451 defaults write com.apple.DiskUtility advanced-image-options -bool true
452
453 ###############################################################################
9ad61b4d »
2012-08-13 .osx: Add SizeUp.app preferences
454 # SizeUp.app #
455 ###############################################################################
456
457 # Start SizeUp at login
458 defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true
459
460 # Don’t show the preferences window on next start
461 defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false
462
463 ###############################################################################
7a6f7ace »
2012-08-13 .osx: Add Transmission.app settings
464 # Transmission.app #
465 ###############################################################################
466
467 # Use `~/Documents/Torrents` to store incomplete downloads
468 defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true
469 defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents"
470
471 # Don’t prompt for confirmation before downloading
472 defaults write org.m0k.transmission DownloadAsk -bool false
473
474 # Trash original torrent files
475 defaults write org.m0k.transmission DeleteOriginalTorrent -bool true
476
477 # Hide the donate message
478 defaults write org.m0k.transmission WarningDonate -bool false
479 # Hide the legal disclaimer
480 defaults write org.m0k.transmission WarningLegal -bool false
481
482 ###############################################################################
050b7ca6 »
2012-07-26 .osx: Add Twitter.app settings
483 # Twitter.app #
484 ###############################################################################
485
486 # Disable smart quotes as it’s annoying for code tweets
487 defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false
488
489 # Show the app window when clicking the menu icon
490 defaults write com.twitter.twitter-mac MenuItemBehavior -int 1
491
492 # Enable the hidden ‘Develop’ menu
493 defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true
494
495 # Open links in the background
496 defaults write com.twitter.twitter-mac openLinksInBackground -bool true
497
498 # Allow closing the ‘new tweet’ window by pressing `Esc`
499 defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true
500
501 # Show full names rather than Twitter handles
502 defaults write com.twitter.twitter-mac ShowFullNames -bool true
503
504 # Hide the app in the background if it’s not the front-most window
505 defaults write com.twitter.twitter-mac HideInBackground -bool true
506
507 ###############################################################################
44ab4cf3 »
2012-06-27 .osx: Group commands in categories
508 # Kill affected applications #
509 ###############################################################################
59c28630 »
2011-10-22 Remove the green checkmark icons in Dropbox.
510
4c6cc924 »
2012-08-13 .osx: Improve categorization
511 for app in "Address Book" "Calendar" "Contacts" "Dock" "Finder" "Mail" \
512 "Safari" "SizeUp" "SystemUIServer" "Terminal" "Transmission" "Twitter" \
513 "iCal" "iTunes"; do
6a424194 »
2012-06-27 .osx: Minor formatting tweak
514 killall "$app" > /dev/null 2>&1
515 done
7baa45cc »
2012-04-30 .osx: Clean up after commit 5b36bee
516 echo "Done. Note that some of these changes require a logout/restart to take effect."
Something went wrong with that request. Please try again.