1
1
#! /usr/bin/env bash
2
2
3
- # ~/.osx — http ://mths.be/osx
3
+ # ~/.osx — https ://mths.be/osx
4
4
5
5
# Ask for the administrator password upfront
6
6
sudo -v
@@ -24,10 +24,10 @@ sudo pmset -a standbydelay 86400
24
24
# Disable the sound effects on boot
25
25
sudo nvram SystemAudioVolume=" "
26
26
27
- # Menu bar: disable transparency
28
- defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
27
+ # Disable transparency in the menu bar and elsewhere on Yosemite
28
+ defaults write com.apple.universalaccess reduceTransparency -bool true
29
29
30
- # Menu bar: hide the Time Machine, Volume, User, and Bluetooth icons
30
+ # Menu bar: hide the Time Machine, Volume, and User icons
31
31
for domain in ~ /Library/Preferences/ByHost/com.apple.systemuiserver.* ; do
32
32
defaults write " ${domain} " dontAutoLoad -array \
33
33
" /System/Library/CoreServices/Menu Extras/TimeMachine.menu" \
@@ -82,7 +82,7 @@ defaults write com.apple.LaunchServices LSQuarantine -bool false
82
82
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
83
83
84
84
# Disable Resume system-wide
85
- defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
85
+ defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false
86
86
87
87
# Disable automatic termination of inactive apps
88
88
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
@@ -93,7 +93,7 @@ defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
93
93
# Set Help Viewer windows to non-floating mode
94
94
defaults write com.apple.helpviewer DevMode -bool true
95
95
96
- # Fix for the ancient UTF-8 bug in QuickLook (http ://mths.be/bbo)
96
+ # Fix for the ancient UTF-8 bug in QuickLook (https ://mths.be/bbo)
97
97
# Commented out, as this is known to cause problems in various Adobe apps :(
98
98
# See https://github.com/mathiasbynens/dotfiles/issues/237
99
99
# echo "0x08000100:0" > ~/.CFUserTextEncoding
@@ -103,10 +103,10 @@ defaults write com.apple.helpviewer DevMode -bool true
103
103
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
104
104
105
105
# Restart automatically if the computer freezes
106
- systemsetup -setrestartfreeze on
106
+ sudo systemsetup -setrestartfreeze on
107
107
108
108
# Never go into computer sleep mode
109
- systemsetup -setcomputersleep Off > /dev/null
109
+ sudo systemsetup -setcomputersleep Off > /dev/null
110
110
111
111
# Check for software updates daily, not just once per week
112
112
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
@@ -191,8 +191,8 @@ defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
191
191
defaults write NSGlobalDomain AppleMeasurementUnits -string " Centimeters"
192
192
defaults write NSGlobalDomain AppleMetricUnits -bool true
193
193
194
- # Set the timezone; see `systemsetup -listtimezones` for other values
195
- systemsetup -settimezone " Europe/Brussels" > /dev/null
194
+ # Set the timezone; see `sudo systemsetup -listtimezones` for other values
195
+ sudo systemsetup -settimezone " Europe/Brussels" > /dev/null
196
196
197
197
# Disable auto-correct
198
198
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
@@ -391,26 +391,20 @@ defaults write com.apple.dock autohide-delay -float 0
391
391
# Remove the animation when hiding/showing the Dock
392
392
defaults write com.apple.dock autohide-time-modifier -float 0
393
393
394
- # Enable the 2D Dock
395
- # defaults write com.apple.dock no-glass -bool true
396
-
397
394
# Automatically hide and show the Dock
398
395
defaults write com.apple.dock autohide -bool true
399
396
400
397
# Make Dock icons of hidden applications translucent
401
398
defaults write com.apple.dock showhidden -bool true
402
399
403
- # Make Dock more transparent
404
- defaults write com.apple.dock hide-mirror -bool true
405
-
406
400
# Disable the Launchpad gesture (pinch with thumb and three fingers)
407
401
# defaults write com.apple.dock showLaunchpadGestureEnabled -int 0
408
402
409
403
# Reset Launchpad, but keep the desktop wallpaper intact
410
404
find " ${HOME} /Library/Application Support/Dock" -name " *-*.db" -maxdepth 1 -delete
411
405
412
406
# Add iOS Simulator to Launchpad
413
- sudo ln -sf " /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/ Applications/iPhone Simulator.app" " /Applications/iOS Simulator.app"
407
+ sudo ln -sf " /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app" " /Applications/iOS Simulator.app"
414
408
415
409
# Add a spacer to the left side of the Dock (where the applications are)
416
410
# defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
@@ -443,6 +437,17 @@ defaults write com.apple.dock wvous-bl-modifier -int 0
443
437
# Safari & WebKit #
444
438
# ##############################################################################
445
439
440
+ # Privacy: don’t send search queries to Apple
441
+ defaults write com.apple.Safari UniversalSearchEnabled -bool false
442
+ defaults write com.apple.Safari SuppressSearchSuggestions -bool true
443
+
444
+ # Press Tab to highlight each item on a web page
445
+ defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true
446
+ defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true
447
+
448
+ # Show the full URL in the address bar (note: this still hides the scheme)
449
+ defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true
450
+
446
451
# Set Safari’s home page to `about:blank` for faster loading
447
452
defaults write com.apple.Safari HomePage -string " about:blank"
448
453
@@ -513,7 +518,14 @@ defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnab
513
518
# been indexed before.
514
519
# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume.
515
520
sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array " /Volumes"
516
- # Change indexing order and disable some file types
521
+ # Change indexing order and disable some search results
522
+ # Yosemite-specific search results (remove them if your are using OS X 10.9 or older):
523
+ # MENU_DEFINITION
524
+ # MENU_CONVERSION
525
+ # MENU_EXPRESSION
526
+ # MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple)
527
+ # MENU_WEBSEARCH (send search queries to Apple)
528
+ # MENU_OTHER
517
529
defaults write com.apple.spotlight orderedItems -array \
518
530
' {"enabled" = 1;"name" = "APPLICATIONS";}' \
519
531
' {"enabled" = 1;"name" = "SYSTEM_PREFS";}' \
@@ -530,7 +542,13 @@ defaults write com.apple.spotlight orderedItems -array \
530
542
' {"enabled" = 0;"name" = "MOVIES";}' \
531
543
' {"enabled" = 0;"name" = "PRESENTATIONS";}' \
532
544
' {"enabled" = 0;"name" = "SPREADSHEETS";}' \
533
- ' {"enabled" = 0;"name" = "SOURCE";}'
545
+ ' {"enabled" = 0;"name" = "SOURCE";}' \
546
+ ' {"enabled" = 0;"name" = "MENU_DEFINITION";}' \
547
+ ' {"enabled" = 0;"name" = "MENU_OTHER";}' \
548
+ ' {"enabled" = 0;"name" = "MENU_CONVERSION";}' \
549
+ ' {"enabled" = 0;"name" = "MENU_EXPRESSION";}' \
550
+ ' {"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \
551
+ ' {"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}'
534
552
# Load new settings before rebuilding the index
535
553
killall mds > /dev/null 2>&1
536
554
# Make sure indexing is enabled for the main volume
@@ -545,8 +563,8 @@ sudo mdutil -E / > /dev/null
545
563
# Only use UTF-8 in Terminal.app
546
564
defaults write com.apple.terminal StringEncodings -array 4
547
565
548
- # Use a modified version of the Pro theme by default in Terminal.app
549
- TERM_PROFILE=' Mathias ' ;
566
+ # Use a modified version of the Solarized Dark theme by default in Terminal.app
567
+ TERM_PROFILE=' Solarized Dark xterm-256color ' ;
550
568
CURRENT_PROFILE=" $( defaults read com.apple.terminal ' Default Window Settings' ) " ;
551
569
if [ " ${CURRENT_PROFILE} " != " ${TERM_PROFILE} " ]; then
552
570
open " ${HOME} /init/${TERM_PROFILE} .terminal" ;
560
578
# defaults write com.apple.terminal FocusFollowsMouse -bool true
561
579
# defaults write org.x.X11 wm_ffm -bool true
562
580
563
- # Install pretty iTerm colors
564
- open " ${HOME} /init/Mathias .itermcolors"
581
+ # Install the Solarized Dark theme for iTerm
582
+ open " ${HOME} /init/Solarized Dark .itermcolors"
565
583
566
584
# Don’t display the annoying prompt when quitting iTerm
567
585
defaults write com.googlecode.iterm2 PromptOnQuit -bool false
@@ -647,6 +665,14 @@ defaults write com.apple.messageshelper.MessageController SOInputLineSettings -d
647
665
defaults write com.google.Chrome ExtensionInstallSources -array " https://gist.githubusercontent.com/" " http://userscripts.org/*"
648
666
defaults write com.google.Chrome.canary ExtensionInstallSources -array " https://gist.githubusercontent.com/" " http://userscripts.org/*"
649
667
668
+ # Disable the all too sensitive backswipe
669
+ defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false
670
+ defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false
671
+
672
+ # Use the system-native print preview dialog
673
+ defaults write com.google.Chrome DisablePrintPreview -bool true
674
+ defaults write com.google.Chrome.canary DisablePrintPreview -bool true
675
+
650
676
# ##############################################################################
651
677
# GPGMail 2 #
652
678
# ##############################################################################
0 commit comments