Skip to content

Commit 25a8173

Browse files
author
kevinSuttle
committed
1 parent 9ff1a80 commit 25a8173

File tree

1 file changed

+49
-23
lines changed

1 file changed

+49
-23
lines changed

.osx

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# ~/.osx — http://mths.be/osx
3+
# ~/.osx — https://mths.be/osx
44

55
# Ask for the administrator password upfront
66
sudo -v
@@ -24,10 +24,10 @@ sudo pmset -a standbydelay 86400
2424
# Disable the sound effects on boot
2525
sudo nvram SystemAudioVolume=" "
2626

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
2929

30-
# Menu bar: hide the Time Machine, Volume, User, and Bluetooth icons
30+
# Menu bar: hide the Time Machine, Volume, and User icons
3131
for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do
3232
defaults write "${domain}" dontAutoLoad -array \
3333
"/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \
@@ -82,7 +82,7 @@ defaults write com.apple.LaunchServices LSQuarantine -bool false
8282
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
8383

8484
# Disable Resume system-wide
85-
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
85+
defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false
8686

8787
# Disable automatic termination of inactive apps
8888
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
@@ -93,7 +93,7 @@ defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
9393
# Set Help Viewer windows to non-floating mode
9494
defaults write com.apple.helpviewer DevMode -bool true
9595

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)
9797
# Commented out, as this is known to cause problems in various Adobe apps :(
9898
# See https://github.com/mathiasbynens/dotfiles/issues/237
9999
#echo "0x08000100:0" > ~/.CFUserTextEncoding
@@ -103,10 +103,10 @@ defaults write com.apple.helpviewer DevMode -bool true
103103
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
104104

105105
# Restart automatically if the computer freezes
106-
systemsetup -setrestartfreeze on
106+
sudo systemsetup -setrestartfreeze on
107107

108108
# Never go into computer sleep mode
109-
systemsetup -setcomputersleep Off > /dev/null
109+
sudo systemsetup -setcomputersleep Off > /dev/null
110110

111111
# Check for software updates daily, not just once per week
112112
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
@@ -191,8 +191,8 @@ defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
191191
defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
192192
defaults write NSGlobalDomain AppleMetricUnits -bool true
193193

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
196196

197197
# Disable auto-correct
198198
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
@@ -391,26 +391,20 @@ defaults write com.apple.dock autohide-delay -float 0
391391
# Remove the animation when hiding/showing the Dock
392392
defaults write com.apple.dock autohide-time-modifier -float 0
393393

394-
# Enable the 2D Dock
395-
#defaults write com.apple.dock no-glass -bool true
396-
397394
# Automatically hide and show the Dock
398395
defaults write com.apple.dock autohide -bool true
399396

400397
# Make Dock icons of hidden applications translucent
401398
defaults write com.apple.dock showhidden -bool true
402399

403-
# Make Dock more transparent
404-
defaults write com.apple.dock hide-mirror -bool true
405-
406400
# Disable the Launchpad gesture (pinch with thumb and three fingers)
407401
#defaults write com.apple.dock showLaunchpadGestureEnabled -int 0
408402

409403
# Reset Launchpad, but keep the desktop wallpaper intact
410404
find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete
411405

412406
# 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"
414408

415409
# Add a spacer to the left side of the Dock (where the applications are)
416410
#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
443437
# Safari & WebKit #
444438
###############################################################################
445439

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+
446451
# Set Safari’s home page to `about:blank` for faster loading
447452
defaults write com.apple.Safari HomePage -string "about:blank"
448453

@@ -513,7 +518,14 @@ defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnab
513518
# been indexed before.
514519
# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume.
515520
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
517529
defaults write com.apple.spotlight orderedItems -array \
518530
'{"enabled" = 1;"name" = "APPLICATIONS";}' \
519531
'{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \
@@ -530,7 +542,13 @@ defaults write com.apple.spotlight orderedItems -array \
530542
'{"enabled" = 0;"name" = "MOVIES";}' \
531543
'{"enabled" = 0;"name" = "PRESENTATIONS";}' \
532544
'{"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";}'
534552
# Load new settings before rebuilding the index
535553
killall mds > /dev/null 2>&1
536554
# Make sure indexing is enabled for the main volume
@@ -545,8 +563,8 @@ sudo mdutil -E / > /dev/null
545563
# Only use UTF-8 in Terminal.app
546564
defaults write com.apple.terminal StringEncodings -array 4
547565

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';
550568
CURRENT_PROFILE="$(defaults read com.apple.terminal 'Default Window Settings')";
551569
if [ "${CURRENT_PROFILE}" != "${TERM_PROFILE}" ]; then
552570
open "${HOME}/init/${TERM_PROFILE}.terminal";
@@ -560,8 +578,8 @@ fi;
560578
#defaults write com.apple.terminal FocusFollowsMouse -bool true
561579
#defaults write org.x.X11 wm_ffm -bool true
562580

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"
565583

566584
# Don’t display the annoying prompt when quitting iTerm
567585
defaults write com.googlecode.iterm2 PromptOnQuit -bool false
@@ -647,6 +665,14 @@ defaults write com.apple.messageshelper.MessageController SOInputLineSettings -d
647665
defaults write com.google.Chrome ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*"
648666
defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*"
649667

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+
650676
###############################################################################
651677
# GPGMail 2 #
652678
###############################################################################

0 commit comments

Comments
 (0)