chubin / wttr.in

:partly_sunny: The right way to check the weather
https://wttr.in
Apache License 2.0
24.43k stars 1.1k forks source link

How to add wttr.in to .conkyrc so that conky can show the weather #118

Closed wonderil closed 6 years ago

wonderil commented 7 years ago

thanks

chubin commented 7 years ago

Try this:

${texeci 1800 curl -s wttr.in | sed -n '3,7{s/\d27\[[0-9;]*m//g;s/^..//;s/ *$//;p}'}
wonderil commented 7 years ago

@chubin thanks for you

chubin commented 7 years ago

@mingyumu Have you tried it? Does it work for you?

wonderil commented 7 years ago

@chubin I tried to modify the grammar to make it run as if it were not

vitich commented 6 years ago

Does not work in new conky: conky: Syntax error (/home/vitich/.conky/conky_tr:2: unexpected symbol near '#') while reading config file. conky: Assuming it's in old syntax and attempting conversion. conky: [string "..."]:150: [string "converted config"]:119: nesting of [[...]] is deprecated near '['

tronje commented 6 years ago

Works like a charm for me! Many thanks, @chubin It's too bad that conky can't handle the colors though...

Edit: conky version: conky 1.10.8_pre compiled Thu Feb 15 00:04:25 UTC 2018 for Linux 4.15.3-1-ARCH x86_64

Edit 2: for anyone else who might find this via Google, I've written a hacky little script to replace the terminal color codes with conky-compatible colors codes. See here: https://gist.github.com/tronje/21c4c1ecf7a9afb133f1814336ac3d48

vitich commented 6 years ago

Transparent variant with imagemagick

${texeci 1800 curl wttr.in/kyiv_0pq_lang=uk.png | convert - -transparent black $HOME/.config/conky/out.png}
${image $HOME/.config/conky/out.png -p 0,0}
EvgenyiRa commented 2 years ago

True ${texeci 1800 curl wttr.in/kyiv_0pqlang=uk.png | convert - -transparent black $HOME/.config/conky/out.png} ${image $HOME/.config/conky/out.png -p 0,0 **-n_**}

chubin commented 2 years ago

@EvgenyiRa Is -n critical here?

@EvgenyiRa @vitich Could you please share a couple of screenshots with conky + wttr.in? I am going to add them to README.md

vitich commented 2 years ago

@chubin Знімок екрану_2022-06-06_16-33-45

chubin commented 2 years ago

Thanks a lot!

Selection_292

Foxap commented 1 year ago

the ascii is all bugged for me

vitich commented 1 year ago

the ascii is all bugged for me Screenshot from 2023-09-19 20-09-39

vitich commented 2 weeks ago

${voffset 65} ${texeci 30 phantomjs $HOME/phantomjs/rasterize.js http://wttr.in/Kyiv /dev/stdout | convert - -crop 200x140+0+0 -transparent black /tmp/wttr.png} ${image /tmp/wttr.png -p}

Screenshot_2024-09-06_06-29-14