You are not logged in.

#1 2010-12-09 09:51:00

Jorje_Villafan
Member
Registered: 2009-01-25
Posts: 13

Another Conky Weather Forecast Solution

Not the prettiest out there, but works for me. Haven't seen this one out there yet.

Dependencies: elinks, conky

What it does: Creates a file in ~/ with weather forecast from weather.com. Then displays pieces of text from that file in Conky.

Place this in your ~/.conkyrc:

${color #79f9ff}Weather              Details               High/low F          Rain?
${color grey}${execi 3600 elinks "http://www.weather.com/weather/print/97302" > YOUR_FILE_NAME ; cat -n YOUR_FILE_NAME | grep "^ *11" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *13" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *15" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *17" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *19" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *21" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *23" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *25" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *27" | cut -c10-100}
${color grey}${execi 3600 cat -n YOUR_FILE_NAME | grep "^ *29" | cut -c10-100}

Replace the 97302 zip code in the address with your own. Change all the YOUR_FILE_NAMEs to whatever you want your weather file name to be. Make sure they are all the same though. Ctrl+S and there should be some weather output in Conky. You might have to fidget with the greps and cuts to make it look right for you (but probably not).

conky example

Offline

Board footer

Powered by FluxBB