You are not logged in.
This is nothing like the beautiful and detailed weather scripts in the main thread, so I didn't want to add this there. I just wanted something quick and dirty for temps etc. for the current day/time (no forecast) in just text format, without any frills or a lot of code. Please move if i'm in the wrong place or if you'd rather have it in the main conky-weather thread.
So i've added weather to my conky display using wttr.in: https://github.com/chubin/wttr.in
Super cool service, only had to install curl for it to work. It will display full info in terminal, but i'm using it with conky and don't need all the details it gives in terminal. It can be a bit tricky to get it to work for your area, it tries by default to do it based on your IP, which wouldn't work quite right for my location so it defaulted to some other area. Play around with it by running in terminal:
curl wttr.in/(add your city, county or lat/long)
You can add a location to the command, in my case again my city is too small and remote for it, but it did recognize me when I typed in my county name, which is great because my county is very small and weather is consistent across it. You can also do it by latitude/longitude.
I set mine to update every 60 minutes, the less calls the better as it will freak out on you for too many calls.
You will likely need to use your system's fixed width font to get the arrows in the wind output to work, mine is Monospace Regular:
${voffset -7}${font Monospace Regular:pixelsize=12}${alignc}
Here's the code I used to stack some simple results in my conky:
${execi 1800 curl wttr.in/(enter your city or county or latitude-longitude here, no parentheses)?format="Condition:+%C\n""Temperature:+%t\n""Wind+chill:+%f\n""Humidity:+%h\n""Pressure:+%P\n""Wind:+%w\n""Precipitation:+%p\n"}
And this is the result (ignore the Exaile output below it ):
You can add or subtract as you see fit, here is a list of the params you can call up:
To specify your own custom output format, use the special %-notation:
c Weather condition,
C Weather condition textual name,
x Weather condition, plain-text symbol,
h Humidity,
t Temperature (Actual),
f Temperature (Feels Like),
w Wind,
l Location,
m Moon phase ????????,
M Moon day,
p Precipitation (mm/3 hours),
P Pressure (hPa),
u UV index (1-12),
D Dawn*,
S Sunrise*,
z Zenith*,
s Sunset*,
d Dusk*,
T Current time*,
Z Local timezone.
(*times are shown in the local timezone)
That's it, works great, simple small solution, just how I like 'em.
Offline
You will likely need to use your system's fixed width font to get the arrows in the wind output to work, mine is Monospace Regular:
${voffset -7}${font Monospace Regular:pixelsize=12}${alignc}
Yep, I like the wttr.in weather service in conky too, mosly for current-day conditions display.
When using DejaVuSans font (both variable and mono version), the wind/moonphase glyphs are showing up correctly - no need to call monospace font.
Offline
Nice! I could have sworn that I tried DejaVuSans and didn't get the arrows....maybe it was a different font.
Weird thing, for a couple weeks or better the arrows weren't working for me, was just getting the box after months of it working fine previously. Then they started working again just a few days ago.
Offline
EXCELLENT STUFF greenjeans
I love wttr.in
Use it a lot
2025·01·24 @ 09:43:56 ~
$ caba
Buenos Aires, Argentina
Rain with thunderstorm, rain shower
T: +24°C ST: +26°C Hum: 83%
Wind: ↓9km/h BAR: 1011hPa Rain: 0.2mm
Dawn: 05:37:50 SunRise: 06:06:22
Zenith: 13:05:46
Sunset: 20:05:03 Dusk: 20:33:29
And this in a terminal:
2025·01·24 @ 09:45:20 ~
$ wtd
Midway: ☀️ -2°C
Honolulu: ⛅️ +18°C
Vancouver: ⛅️ -1°C
Los+Angeles: ☀️ +14°C
Edmonton: ☀️ -2°C
Mexico+City: ☁️ +9°C
Winnipeg: ☀️ -11°C
Chicago: ☀️ -14°C
Montreal: ⛅️ -12°C
ylt: ⛅️ -33°C
Toronto: ☀️ -7°C
Miami: ? +9°C
New+York: ☀️ -5°C
Martinique: ☀️ +25°C
St+Johns: ☀️ +2°C
sabe: ☀️ +25°C
Santiago: ☀️ +3°C
London: ⛅️ +10°C
Cairo: ⛅️ +20°C
Athens: ☀️ -4°C
Kastoria: ⛅️ +11°C
Rome: ☀️ +12°C
Paris: ? +9°C
Zurich: ☀️ -7°C
Madrid: ⛅️ +11°C
Berlin: ☀️ +6°C
Jerusalem: ⛅️ +16°C
Johannesburg: ⛅️ +31°C
Cape+Town: ☀️ +27°C
Moscow: ☀️ -2°C
New+Delhi: ? +22°C
Ho+Chi+Minh: ☀️ +29°C
Shanghai: ⛅️ +13°C
Tokyo: ⛅️ +13°C
Sydney: ⛅️ +22°C
Melbourne: ☀️ +18°C
Bougainville: ? +9°C
Auckland: ☀️ +19°C
Chatham: ☁️ -9°C
2025·01·24 @ 09:49:08 ~
$
Also use something similar in this conky, wttr.in gets the image and name.
Pops up in a box, read it, [x] close it.
EDIT: Posted a wrong way to do it. Removed it.
Last edited by Sector11 (2025-01-24 14:26:08)
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline