You are not logged in.

#221 2025-12-31 19:58:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,105

Re: Conky Weather TAD script

Before I start drinking (beer), tad-font-conky  finished:

${voffset 10}\
${goto 8}${color 48bcff}WEATHER${color}\
${texeci 1800 bash $HOME/time_and_date_conky_script/tad}
${goto 120}${voffset 10}Currently:
${goto 20}${font conkyweather:size=60}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/weatherfont/now}${font}${color fedf08}${voffset -35}${font :size=18}${goto 120}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/now | awk '{print $2}'}° ${color 48bcff}(${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/now | awk '{print $3}'}°)${font}${color}${voffset -20}${color}

${voffset 30}${alignc}${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/now}

${goto 32}${color 48bcff}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/time}\
${goto 122}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/time}\
${goto 212}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/time}${color}
${voffset 5}${goto 20}${font conkyweather:size=30} ${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/weatherfont/hourly}${goto 110} ${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/weatherfont/hourly}${goto 200} ${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/weatherfont/hourly}${font}
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 35}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 32}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}\
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 125}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 122}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}\
${if_match "${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 215}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 212}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}

${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\
${goto 15}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date}${color}
${voffset 5}${goto 20}${font conkyweather:size=50}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/weatherfont/daily}${font}${goto 100}${voffset -45}${color ff8080}High and Low:${color}  ${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $1}' | sed 's/.*/&./'}
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\

${voffset -20}${goto 15}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date}${color}
${voffset 5}${goto 20}${font conkyweather:size=50}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/weatherfont/daily}${font}${goto 100}${voffset -45}${color ff8080}High and Low:${color}  ${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/temperatures}  °C
${goto 100}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $1}' | sed 's/.*/&./'}
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $2}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}" != "."}${goto 100}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/phrase | awk -F'.' '{print $3}' | sed 's/^[ \t]*//' | sed 's/.*/&./'}\
${else}${endif}

EDIT
Slightly changed.

Note *
The minimum_size  is 270 455

Conkys:
tad-font.png  test-conky.png

Folders and images:
daily.png  hourly.png

Happy New Year everyone!
happy-new-year-2026.gif

Last edited by marens (2026-01-01 19:30:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#222 2026-01-06 14:35:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,105

Re: Conky Weather TAD script

Flood Icon

marens wrote:

A couple of small changes.
For example, the wt-32.png icon is a flood.
Replaced with N/A.

This is the original wt-32.png  tad-icon indicating a flood:

wt-32.png

The test_image  function can be adjusted to produce a similar icon.
This is of course a simulation * :

flood.png

Replace:

         32)
           echo -
         ;;

With:

         32)
           echo 9
         ;;

The devil always hides in the details.
Maybe it's better not to wake him?

The TAD script has been updated:
https://forums.bunsenlabs.org/viewtopic … 76#p147776

Note *
I don't know what this "symbol" represents in the ConkyWeather font and I hope you never see it in your weather forecast.

This is probably the only weather forecast that has a flood icon and I think the suggested symbol is appropriate as it is not used anywhere else in the TAD script.

Last edited by marens (2026-01-06 15:34:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#223 2026-01-06 15:10:54

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,862

Re: Conky Weather TAD script

marens wrote:

Note *
I don't know what this "symbol" represents in the ConkyWeather font and I hope you never see it in your weather forecast.

Fog
second attempt
https://forums.bunsenlabs.org/viewtopic … 80#p148080

Offline

#224 2026-01-12 09:41:33

alexban21
New Member
Registered: 2026-01-12
Posts: 1

Re: Conky Weather TAD script

Thanks for posting this and for the heads-up about Accuweather_RSS being down for the moment.

I gave the TAD script a quick read and it’s a solid stopgap. A couple of notes that might save people some head-scratching:

Make it executable after you create it:

chmod +x ~/time_and_date_conky_script/tad


Then you can run it as ~/time_and_date_conky_script/tad instead of bash ….

Dependencies: this will need curl, grep, awk, sed (usually present) and also ImageMagick for convert:

sudo apt install imagemagick


(Otherwise it’ll fail at the icon step.)

The parsing is pretty brittle (lots of grep ... | awk -F ...) so if timeanddate tweaks their HTML even slightly, some lines may come out blank. If anyone hits that, the first thing to check is ~/time_and_date_conky_script/weather_raw to see what changed.

Minor cleanup: you don’t need cat file | grep ... — grep ... file is enough — but that’s just style, not required.

I updated the address= line to my location and after one manual run, ~/time_and_date_conky_script/now had the expected fields (temp / feels like / forecast / etc.), so it looks like it should work fine as a Conky text source until Accuweather is back.

If you want, I can also post a simple Conky snippet that reads now and displays the 0.png icon cleanly.

Offline

#225 2026-01-12 13:50:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,105

Re: Conky Weather TAD script

^ First of all, welcome to the BL forums @alexban21.

Thanks for testing the TAD script.

alexban21 wrote:

Make it executable after you create it:

chmod +x ~/time_and_date_conky_script/tad

Then you can run it as ~/time_and_date_conky_script/tad instead of bash ….

Dependencies: this will need curl, grep, awk, sed (usually present) and also ImageMagick for convert:

sudo apt install imagemagick

1) When you download the script, it is already made executable.
2) @TBG always use bash to run weather scripts in conkys.
3) Our forum members using @TBG's accuweather scripts have all dependencies installed.

Yes.
Parsing is quite complicated.
The website uses many local variations (units, time format...) and it was difficult to create a script that works for all locations.

alexban21 wrote:

If you want, I can also post a simple Conky snippet that reads now and displays the 0.png icon cleanly.

It is common on this forum for members to make suggestions or post their solutions.

Anyway, thanks for the feedback.

EDIT

alexban21 wrote:

I updated the address= line to my location and after one manual run, ~/time_and_date_conky_script/now had the expected fields (temp / feels like / forecast / etc.), so it looks like it should work fine as a Conky text source until Accuweather is back.

I'm not sure which version of the TAD script you tested.

Meanwhile, hourly and daily forecasts have been added, as well as the ability to use weather/wind fonts.
Here is the latest version:
https://forums.bunsenlabs.org/viewtopic … 76#p147776

The TAD script is now complete.
I could easily extend the daily forecast to 15 days (instead of 7), but I don't think that's necessary.

Last edited by marens (2026-01-13 18:54:40)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#226 2026-01-21 14:15:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,105

Re: Conky Weather TAD script

Hourly Forecast  -  Phrase

Added phrases to the hourly forecast.

Find the ## Time line inside the #### HOURLY FORECAST and add the ## Phrase line below.
It should look like this:

## Time
cat $HOME/time_and_date_conky_script/weather_raw | grep -o '[ ^]class=h2 ><td>Now</td><td>[^r]*' | sed -e 's/<\/td><td>/\n/g' | sed '1,1d' | sed 's/<\/td><\/t//' > $HOME/time_and_date_conky_script/hourly/time

## Phrase
cat $HOME/time_and_date_conky_script/weather_raw | grep -o '[ ^]class=mtt title="[^"]*' | sed -n '3,7p' | sed 's/ class=mtt title="//' > $HOME/time_and_date_conky_script/hourly/phrase

Done.

tad.png  hourly.png  phrase.png

Note *
The TAD script has been updated:
https://forums.bunsenlabs.org/viewtopic … 76#p147776

Last edited by marens (2026-01-21 14:32:40)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#227 2026-02-09 15:46:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,105

Re: Conky Weather TAD script

New TAD Icons

The developers have refreshed the weather icons on the website.
Honestly, I think it looks better.

Old:                                         New:
tad-icons-old.png  tad-icons-new.png

You can download the new icons here:
https://workupload.com/file/y6RxV9cAfZr

Enjoy!  smile


If people would know how little brain is ruling the world, they would die of fear.

Offline

#228 2026-02-11 15:00:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,105

Re: Conky Weather TAD script

The new icons look acceptable.

Conkys:
tad-conky.png  weatherfont.png

Folders and images:
hourly.png  daily.png

We now have three icon themes (old, new, WU) + weather/wind font.
It's always good to have a choice.  smile

P.S.
The best way to change the icon theme is explained here:
https://forums.bunsenlabs.org/viewtopic … 84#p147784


If people would know how little brain is ruling the world, they would die of fear.

Offline

#229 2026-02-18 08:52:20

asqwerth
Member
Registered: 2015-10-08
Posts: 59

Re: Conky Weather TAD script

@marens, thanks for the heads up about the new icons.

Offline

#230 2026-02-21 19:25:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,105

Re: Conky Weather TAD script

When the weather is bad and you're sitting at home, you need to do something interesting.

Make TAD conky with new icons?
It sounded like a good idea and about half an hour later:

tad.png  tad-weatherfont.png

OK.
Now it's time for dinner and watching TV (again).


If people would know how little brain is ruling the world, they would die of fear.

Offline

#231 Today 19:45:50

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,105

Re: Conky Weather TAD script

A little more playing with the new icons.

The hourly forecast section has been made more compact (smaller icon size) and the spacing has been changed to better center the icons.
The  hourly_3.png  icon (wt-19.png - Rain) was inserted as a simulation because it is the largest and it is the best way to control the spacing.
The same is done in the daily forecast with the  day_3.png  icon.

* Simulation:

tad-conky.png

I also checked the special cases for wind (No wind  +  N/A).
The TAD script works well under those conditions and provides the appropriate wind icon.
In conky, you get  Not available.

tad-calm.png  tad-NA.png

What you don't see right away is that the temperatures in the hourly forecast are set to be centered depending on whether they are in the double digits (10 °C +) or single digits (e.g. 8 °C).
Non-working days are shown in red.

I'm using an older version of Conky and the syntax (format) is old, but you can easily replace the TEXT part.
In the configuration I set the size with:

minimum_size 460 0

This is a  tad-conky  (TEXT part) that you can easily customize as you wish:

TEXT
${voffset 8}${goto 10}${color 48bcff}WEATHER${color}\
${texeci 1800 bash $HOME/time_and_date_conky_script/tad}
${goto 120}${voffset 10}Currently:${goto 270}Wind:
${color fedf08}${voffset 15}${font :size=18}${goto 120}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/now | awk '{print $2}'}° ${color 48bcff}(${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/now | awk '{print $3}'}°)${font}${color}${voffset -10}\
${goto 270}${color 2ae8ff}@${color} ${offset 2}${texeci 90 sed -n '9p' $HOME/time_and_date_conky_script/now | awk '{print $2, $3}'}
${goto 270}${font :size=9}${color ff8080}\
${if_match "${texeci 90 sed -n '10p' $HOME/time_and_date_conky_script/now | sed 's/from //'}" == ""}Not available${color}${font}${voffset -28}\
${else}${texeci 90 sed -n '10p' $HOME/time_and_date_conky_script/now | sed 's/from //'}${color}${font}${voffset -28}${endif}

${voffset 30}${alignc}${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/now}

${goto 35}${color 48bcff}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/time}\
${goto 125}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/time}\
${goto 215}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/time}\
${goto 305}${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/hourly/time}\
${goto 395}${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/hourly/time}${color}



${voffset 5}\
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 38}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 35}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}\
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 128}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 125}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}\
${if_match "${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 218}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 215}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}\
${if_match "${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 308}${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 305}${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}\
${if_match "${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/hourly/temperature | awk '{print length}'}" == "4"}${goto 398}${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/hourly/temperature}${else}${goto 395}${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/hourly/temperature}${endif}

${goto 15}${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\
${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/date | awk '{print $1, $2}'}\
${goto 105}${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\
${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/date | awk '{print $1, $2}'}\
${goto 195}${if_match "${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\
${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/date | awk '{print $1, $2}'}\
${goto 285}${if_match "${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\
${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/date | awk '{print $1, $2}'}\
${goto 375}${if_match "${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sat"}${color ff8080}\
${else}\
${if_match "${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/date | awk '{print $1}'}" == "Sun"}${color ff8080}\
${else}${color 48bcff}${endif}${endif}\
${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/date | awk '{print $1, $2}'}${color}
${voffset 5}${font :size=9}${goto 70}${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/temperatures | awk '{print $1}'}°${goto 160}${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/temperatures | awk '{print $1}'}°${goto 250}${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/temperatures | awk '{print $1}'}°${goto 340}${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/temperatures | awk '{print $1}'}°${goto 430}${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/temperatures | awk '{print $1}'}°
${color 0080ff}${goto 75}/${texeci 90 sed -n '1p' $HOME/time_and_date_conky_script/temperatures | awk '{print $3}'}°${goto 165}/${texeci 90 sed -n '2p' $HOME/time_and_date_conky_script/temperatures | awk '{print $3}'}°${goto 255}/${texeci 90 sed -n '3p' $HOME/time_and_date_conky_script/temperatures | awk '{print $3}'}°${goto 345}/${texeci 90 sed -n '4p' $HOME/time_and_date_conky_script/temperatures | awk '{print $3}'}°${goto 435}/${texeci 90 sed -n '5p' $HOME/time_and_date_conky_script/temperatures | awk '{print $3}'}°

${image $HOME/time_and_date_conky_script/0.png -p 10,38 -s 80x80}\
${image $HOME/time_and_date_conky_script/wind_0.png -p 350,48 -s 70x70}\
${image $HOME/time_and_date_conky_script/day_1.png -p 10,278 -s 55x55}\
${image $HOME/time_and_date_conky_script/day_2.png -p 100,278 -s 55x55}\
${image $HOME/time_and_date_conky_script/day_3.png -p 190,278 -s 55x55}\
${image $HOME/time_and_date_conky_script/day_4.png -p 280,278 -s 55x55}\
${image $HOME/time_and_date_conky_script/day_5.png -p 370,278 -s 55x55}\
${image $HOME/time_and_date_conky_script/hourly/hourly_1.png -p 19,170 -s 60x60}\
${image $HOME/time_and_date_conky_script/hourly/hourly_2.png -p 109,170 -s 60x60}\
${image $HOME/time_and_date_conky_script/hourly/hourly_3.png -p 199,170 -s 60x60}\
${image $HOME/time_and_date_conky_script/hourly/hourly_4.png -p 289,170 -s 60x60}\
${image $HOME/time_and_date_conky_script/hourly/hourly_5.png -p 379,170 -s 60x60}

EDIT
I removed the line that runs the script when I was doing the simulations.  smile

Last edited by marens (Today 22:28:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

Board footer

Powered by FluxBB