Outside: A multi-purpose weather client for your terminal
3 months ago
1
A multi-purpose weather client for your terminal.
Usage: outside [OPTIONS]
Options:
-l, --location <LOCATION> Location to fetch weather data for,
leave blank to auto-detect using your IP address
-u, --units <UNITS> Units of measurement [possible values: metric, imperial]
-o, --output <OUTPUT> Display format [possible values: tui, simple, detailed, json, waybar]
-s, --stream Enable streaming mode for continuous output
-i, --interval <INTERVAL> Interval in seconds between streaming updates [default: 30]
-h, --help Print help
-V, --version Print version
The --location should be a string with your city and country code, e.g. London, GB or New York, US. If this value is not provided, http://ip-api.com will be used to auto-detect your location based on your IP address. Location data is cached for 4 hours, and weather data is cached for 10 minutes to reduce API calls.
Overcast 18°C | Wind 713 | Precipitation 53%
$ outside -o detailed
Edmonton, CA
Current: 17.6°C Overcast
Feels Like: 17.5°C
Humidity: 72%
Pressure: 1006.9hPa
Wind: 6.6km/h with gusts up to 13.0km/h (W)
UV Index: 6.2
Precip: 0.8 mm (53% chance)
Sunrise: 05:07am
Sunset: 10:06pm
Fri 06/27 9-22°C - Rain showers, slight
Sat 06/28 13-21°C - Thunderstorm
Sun 06/29 11-24°C - Overcast
Mon 06/30 14-25°C - Overcast
Tue 07/01 15-25°C - Overcast
Wed 07/02 14-30°C - Overcast
Thu 07/03 16-24°C - Rain showers, slight
$ outside -o detailed -l 'Los Angeles, US' -u imperial
Los Angeles, US
Current: 67.1°F Clear sky
Feels Like: 68.9°F
Humidity: 80%
Pressure: 1012.5hPa
Wind: 4.6mp/h with gusts up to 5.8mp/h (W)
UV Index: 8.5
Precip: 0.0 inch (0% chance)
Sunrise: 05:43am
Sunset: 08:08pm
Fri 06/27 61-85°F - Fog
Sat 06/28 58-87°F - Fog
Sun 06/29 58-85°F - Fog
Mon 06/30 65-77°F - Clear sky
Tue 07/01 64-79°F - Clear sky
Wed 07/02 64-77°F - Clear sky
Thu 07/03 63-74°F - Clear sky
Important: You will also need a nerd patched font to display the weather icons. You can find one at Nerd Fonts. Many distributions already include these fonts, so you may not need to install anything extra.
You can also add conditional styling based on the weather condition. For example, to change the background color based on the weather condition and have the module blink during adverse conditions, you can use the following CSS: