cross-posted from: https://gekinzuku.com/post/394282
Lately I’ve been obsessed with moving everything that people typically use as widgets into my bashrc. Today I discovered wttr.in, which is an open source project on Github at https://github.com/chubin/wttr.in
Usage is almost trivial. To get weather in your terminal, simply curl the URL with your city after the forward slash. If you live in New York City, use
curl 'https://wttr.in/New%20York'
Now, if that’s too much bloat to have covering your precious terminal real estate, instead use
curl 'https://wttr.in/New%20York'?0?A?u
which will truncate the curl to only today’s weather.
Weird, I usually just get weather report on my speakers
RIP Jaco
Love a good weather report suite
Heavy Weather
Can you get more than three days?
I think no. It appears to be a limitation of the underlying WorldWeatherOnline API.
See https://github.com/chubin/wttr.in#get-a-worldweatheronline-key-and-configure-wego
and https://github.com/chubin/wttr.in/issues/682
O stepped into this a couples days ago looking for a weather info to waybar and found this python script with wttr …with a couple tweaks and some documentation reading I got it to work really easily in Portuguese
I like that I can change to
https://pt.wttr.in/
and get the Portuguese siteSaw that just after tweaking the script to get the pt-br entry of the json object so I didn’t change to pt website
You can also use this in conjuction with conky to get text weather on your desktop
To follow up on that, here are the official conky directions: https://github.com/chubin/wttr.in#conky
There is also the weather command. Text only, but more detail and more days ahead.
Partly cloudy looks like a bunny lol
I can’t unsee it now
Apparently, this needs the terminal to be at least 125 characters wide to display correctly. My terminal is typically narrower than that (110 by default in uncustomized Konsole, or 116 when I snap it to half my monitor width).
Is there a way to get it formatted for the traditional VT100 80-character width, or at least ≤110?
Sorry, I forgot to get back to this. It looks like it’s possible to get something that fits better with the
?2n
option. See https://github.com/chubin/wttr.in/issues/151
This is one use case where I actually much prefer windows