Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on gekinzuku.com
linux·Linuxbygraham1

YSK How to get a weather report in your terminal

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.

View original on gekinzuku.com
175

17 replies

lemmy.world

Weird, I usually just get weather report on my speakers

13
lemmy.ml

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

8
graham1reply
gekinzuku.com

I like that I can change to https://pt.wttr.in/ and get the Portuguese site

1

Saw that just after tweaking the script to get the pt-br entry of the json object so I didn't change to pt website

2
mlg
lemmy.world

You can also use this in conjuction with conky to get text weather on your desktop

6

There is also the weather command. Text only, but more detail and more days ahead.

4
lemmy.world

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?

3

You reached the end

YSK How to get a weather report in your terminal | Spyke