gabyshev / plugin-weather

A simple, location-aware weather command for Fish

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


weather

Plugin for Oh My Fish.

Uses your IP address to determine your location and find relevant weather data anywhere in the world.

Install

$ omf install weather

Usage

To view a detailed usage guide, run weather --help.

$ weather
Weather for Madison, United States

Temperature: 14.37 °C (57.86 °F)
   Humidity: 58%
 Cloudiness: sky is clear
   Pressure: 1029 hpa
       Wind: from NE (60°) at 7.2 m/s gusting to 10.8 m/s

5-day forecast
Temperature:   ▃▂▃▆▆▃▂▁▁▁▂▅▆▃▂▂▃▄▆██▇██▇▆▅▅▅▅▄▄▄▅▆▇█▅
               28/11  29/11  30/11  01/12  02/12  03/12

Precipitation: ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▅█▃▁▁▁▁▁▁▁▁▁▁▁▁▁
               28/11  29/11  30/11  01/12  02/12  03/12

Configuring

You can customize the display of weather data using global variables. By default, both Celsius and Fahrenheit is displayed for the temperature. You can override this by specifying a particular unit to use in $temperature_units. Valid options are:

  • celsius
  • fahrenheit
  • kelvin

You can see the results by changing the value and running weather again:

$ set -g temperature_units celsius
$ weather
Temperature: 14.37 °C
   Humidity: 58%
 Cloudiness: sky is clear
   Pressure: 1029 hpa
       Wind: from NE (60°) at 7.2 m/s gusting to 10.8 m/s

You can set this permanently by adding the set command in your init.fish file.

You can also configure the weather command to use the system default DNS resolver to fetch your IP address if one is configured.

$ set -g __weather_system_dns 1

License

MIT © coderstephen et al

About

A simple, location-aware weather command for Fish

License:MIT License


Languages

Language:Shell 100.0%