One of the most underrated things that comes with open source projects that isn't talked about enough is the whimsy. The developers make anything they like, unshackled by any bonds of a boring format, and the result of this kind of freedom is a program like weathr.
weathr is a CLI tool written in Rust that gives you a full weather report, complete with a general category, temperature, wind speed and precipitation.
What separates it from other weather utilities is that it shows you what the weather looks like in ASCII graphics, with a little house and shrubbery, featuring absolutely adorable animations.
weathr
weathr retrieves the weather data from Open-Meteo, and it has several modes and configurations that you can play around with.
Different animation for different kind of weather
I understand that monsoon is not a season experience in many parts of the world but let's say it's raining outside.
weathr --simulate rainThis is what it would look like in weathr:
weathr rain simulation
I have never experienced snowfall in real but at least I can simulate it ;)
weathr --simulate snowweathr snow simulation
If not snow, for sure I have witnessed fog in winters:
weathr --simulate fogweathr fog simulation
There are several more options you can simulate, listed on the help page, which are put into four categories:
- Clear Skies: clear, partly-cloudy, cloudy, overcast
- Precipitation: fog, drizzle, rain, freezing-rain, rain-showers
- Snow: snow, snow-grains, snow-showers
- Storms: thunderstorm, thunderstorm-hail
Different animation for different time of the day
Weathr takes care of the time of the day. The daytime animations include the sun, gliding clouds, v-shaped birds, and bright colors. Nighttime comes with animations of the moon, twinkling stars, gliding clouds, and fireflies and shooting stars.
To simulate the weather at nighttime, you have to choose a simulation condition first and add an -n flag to signify the time of day:
weathr --simulate clear -nweathr nighttime simulation
You can simulate any of the weather conditions mentioned before. You can also choose to make the leaves fall as if it was autumn within the window with the -l flag. I guess -l stands for leaves here.
weathr --simulate clear -lweathr fall simulation
Units of your choice
There are two broad categories you can choose from, obviously being imperial and metric units:
weathr --imperial
weathr --metricYou can also specify specific units for all the different fields, with the options being:
- Temperature: celsius, fahrenheit
- Wind Speed: kmh, ms, mph, kn (knots)
- Precipitation: mm, inch
This can be added to the configuration file at ~/.config/weathr:
[units]
temperature = "celsius"
wind_speed = "kmh"
precipitation = "mm"weathr --hide-location weathr --hide-hudSet the location manually and accurately (if you want to)
If you run weathr as it is, it will track your public IP and show the weather for that location. Now, we all know that public IP is not an accurate measure of location. And if you use VPN on your Linux system, you won't want to see the weather of Australia when you are in America.
The good thing is that weathr allows you to configure your location. It requires some config file editing but that's not overly complicated.
First thing first, use a map on your smartphone to get the coordinates of your location. You can also use a website like GPS Coordinate for this purpose.
To start with, for an accurate weather report without being intrusive, weathr takes in the exact coordinates input by the user to provide a weather report. It can be updated in the configuration file for a permanent setting of the location or change of the same. To do it, you need to first create the configuration file using:
mkdir -p ~/.config/weathrTo enter the location, given that you know your coordinates, access the newly created configuration file at ~/.config/weathr and add the following:
[location]
# Location coordinates (overridden if auto = true)
latitude = 40.7128
longitude = -74.0060Other than that, you can choose an auto-location option that gets the location from your IP address.
weathr --auto-locationInstalling weathr
Installing weathr needs Rust and Cargo, after which you can enter the following commands:
git clone https://github.com/veirt/weathr.git
cd weathr
cargo install --path .If you wish to check the help page for quick peak at the available commands:
weathr --helpWrapping Up
While "necessary" isn't the word that can be used to describe an app like weathr, it still stands as a testament to how fun and innovative open source applications can be. With a minimal system load, weathr adds a touch of delightful playfulness. I mean, we should surely add it to our list of fun ASCII tools.
Please let us know what you think about weathr in the comments, and if you would use it for your daily weathr report needs. Cheers!