So, to change the location displayed, you just have to change four letters in you ~/.xmobarrc. You will see near the "commands" words "[ Run Weather "XXXX""

To get my configuration, which defaults to Millville, New Jersey's airport, copy and paste this into a file in your home directory called .xmobarrc: (this is a good starting point if you don't have a file already, or you broke yours with hacks and tweaking)
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, bgColor = "#0a0a0a"
, fgColor = "#558e7d"
, position = Bottom
, lowerOnStart = False
, commands = [ Run Weather "KMIV" ["-t","<station>: <tempF>F","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000
, Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Com "uname" ["-s","-r"] "" 36000
, Run Date "%a %b %_d %Y %H-> %l:%M:%S" "date" 10
]
, sepChar = "%"
, alignSep = "}{"
, template = "%cpu% | %memory% | %eth0% - %eth1% }{ <fc=#ee9a00>%date%</fc>| %KMIV% | %uname%"
}
It is also available as a raw file on my github. These commands will install that file (ASSUMING YOU ARE IN YOUR HOME DIRECTORY):
rm .xmobarrc
wget https://raw.github.com/dymatic/dotfiles/master/xmobar/.xmobarrc
If you aren't in your home directory, this will work.
rm ~/.xmobarrc
wget https://raw.github.com/dymatic/dotfiles/master/xmobar/.xmobarrc -o ~/.xmobarrc
I stumbled across this blogpost when searching for how to identify the code for my town. Thanks a lot!
ReplyDelete