Add Custom Weather Widget For All Users From Terminal – Mac OS X.

If you’re like me and love automating everything you can when setting up MacBooks for new users then you are going to love this next little code snippet. This code adds the weather widget with the city of your choosing to the dashboard for all user profiles on a mac.

In the example below I chose the city Lewisville, TX. You can easily modify it to show the weather of any city you like.

# Sets weather widget to Lewisville
 
defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/widget-com.apple.widget.weather.plist 0000000000000004-celcius -bool false
defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/widget-com.apple.widget.weather.plist 0000000000000004-collapsed -bool false
defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/widget-com.apple.widget.weather.plist 0000000000000004-show-lows -bool true
defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/widget-com.apple.widget.weather.plist 0000000000000004-yahooBacksideCityString -string "Lewisville, TX"
defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/widget-com.apple.widget.weather.plist 0000000000000004-yahooFrontsideCityString -string Lewisville
defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/widget-com.apple.widget.weather.plist 0000000000000004-yahooPostal -string "USTX0761|2438795"

2 Replies to “Add Custom Weather Widget For All Users From Terminal – Mac OS X.”

Leave a Reply

Your email address will not be published. Required fields are marked *

*