4.11.2012

Mac OS X "SOE" continued

A few more snippets I am considering adding to my build.sh script. The build script loops the User Templates...tested today, they all work. Just trying to decide whether one size fits all ;) (will definitely add the dock changes, way faster!)

#* Default user preferences.
for USER_TEMPLATE in `sudo ls /System/Library/User\ Template`
do
 if [ -r "/System/Library/User Template/${USER_TEMPLATE}/Library/Preferences" ]; then
  #+ Menu bar transparency disabled
  sudo /usr/bin/defaults write "/System/Library/User Template/${USER_TEMPLATE}/Library/Preferences/.GlobalPreferences" AppleEnableMenuBarTransparency -bool FALSE

  #+ Battery MenuExtra Settings
  sudo /usr/bin/defaults write "/System/Library/User Template/${USER_TEMPLATE}/Library/Preferences/com.apple.menuextra.battery" ShowPercent -string "NO"
  sudo /usr/bin/defaults write "/System/Library/User Template/${USER_TEMPLATE}/Library/Preferences/com.apple.menuextra.battery" ShowTime -string "YES"

  # Speed up the dock, disable delay and animation.
  sudo /usr/bin/defaults write "/System/Library/User Template/${USER_TEMPLATE}/Library/Preferences/com.apple.dock" autohide-delay -float 0
  sudo /usr/bin/defaults write "/System/Library/User Template/${USER_TEMPLATE}/Library/Preferences/com.apple.dock" autohide-time-modifier -float 0

 fi
done