weather
Plugin for Oh My Fish.
Uses your IP address to determine your location and find relevant weather data anywhere in the world.
Prerequisites
This plugin depends on jq. Version 1.5+
Install
$ omf install weatherUsage
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/12Configuring
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:
celsiusfahrenheitkelvin
You can see the results by changing the value and running weather again:
$ config weather -s 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/sYou can set this permanently by adding the config weather -s temperature-units command in your .config/omf/init.fish file:
config weather -s temperature-units < celsius | fahrenheit | kelvin >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 1License
MIT © coderstephen et al
