From 290feeafbe81d05e2e9b922b419c5a54ba0336f9 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Thu, 9 Oct 2014 09:17:55 -0700 Subject: [PATCH] [meta] Update defaults Took some more defaults from [here](https://gist.github.com/brandonb927/3195465). --- ansible/roles/osx/tasks/casks.yml | 3 +++ ansible/roles/osx/tasks/defaults.yml | 10 ++++++++++ ansible/roles/osx/vars/defaults.yml | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/ansible/roles/osx/tasks/casks.yml b/ansible/roles/osx/tasks/casks.yml index 8704c60..e55f3b7 100644 --- a/ansible/roles/osx/tasks/casks.yml +++ b/ansible/roles/osx/tasks/casks.yml @@ -5,3 +5,6 @@ - command: brew install caskroom/cask/brew-cask - homebrew_cask: name={{ item }} state=installed with_items: casks +- command: defaults write {{ item }} + with_items: + - com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false diff --git a/ansible/roles/osx/tasks/defaults.yml b/ansible/roles/osx/tasks/defaults.yml index 3b12e68..680a4d9 100644 --- a/ansible/roles/osx/tasks/defaults.yml +++ b/ansible/roles/osx/tasks/defaults.yml @@ -4,6 +4,16 @@ # sudo: True - command: defaults write {{ item }} with_items: osx_defaults +- command: defaults write {{ item }} dontAutoLoad -array + /System/Library/CoreServices/Menu Extras/TimeMachine.menu + /System/Library/CoreServices/Menu Extras/Bluetooth.menu + /System/Library/CoreServices/Menu Extras/Battery.menu + with_lines: ls ~/Library/Preferences/ByHost/com.apple.systemuiserver.* +- command: /usr/libexec/PlistBuddy -c "{{ item }}" ~/Library/Preferences/com.apple.finder.plist + with_items: + - Set :DesktopViewSettings:IconViewSettings:arrangeBy grid + - Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid + - Set :StandardViewSettings:IconViewSettings:arrangeBy grid - command: killall {{ item }} with_items: - Finder diff --git a/ansible/roles/osx/vars/defaults.yml b/ansible/roles/osx/vars/defaults.yml index 1aa943a..129f1d0 100644 --- a/ansible/roles/osx/vars/defaults.yml +++ b/ansible/roles/osx/vars/defaults.yml @@ -4,6 +4,7 @@ osx_defaults: # named osx_defaults since there's an Ansible conflict w/defaults - NSGlobalDomain AppleFontSmoothing -int 2 # subpixel rendering on non-Apple LCDs - NSGlobalDomain AppleKeyboardUIMode -int 3 # full keyboard access + - NSGlobalDomain AppleShowAllExtensions -bool true # show all extensions by default - NSGlobalDomain KeyRepeat -int 2 # keyboard repeat rate - NSGlobalDomain NSTableViewDefaultSizeMode -int 1 # set sidebar item size to small - NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false # disable resume @@ -26,6 +27,7 @@ osx_defaults: # named osx_defaults since there's an Ansible conflict w/defaults # - com.apple.driver.AppleBluetoothMultitouch.trackpad Dragging -int 1 - com.apple.dt.Xcode DVTTextAutoSuggestCompletionsDelay 0.1 # Xcode autocomplete delay - com.apple.finder FXEnableExtensionChangeWarning -bool false # don't ask when changing file extension + - com.apple.finder FXPreferredViewStyle -string Nlsv # default to list view - com.apple.finder QLEnableTextSelection -bool true # enable text selection in QuickLook # - com.apple.finder ShowPathbar -bool true # show path bar # - com.apple.finder ShowStatusBar -bool true # show status bar @@ -35,4 +37,9 @@ osx_defaults: # named osx_defaults since there's an Ansible conflict w/defaults # - com.apple.iTunes invertStoreLinks -bool true - com.apple.screencapture disable-shadow -bool true # no window shadows when capturing windows - com.apple.screencapture location ~/Downloads + - com.apple.screensaver askForPassword -int 1 + - com.apple.systemuiserver menuExtras -array + "/System/Library/CoreServices/Menu Extras/AirPort.menu" + "/System/Library/CoreServices/Menu Extras/Volume.menu" + "/System/Library/CoreServices/Menu Extras/Clock.menu" # - com.apple.terminal StringEncodings -array 4 # UTF-8 in Terminal