Skip to content
A simple, location-aware weather command for Fish
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
functions
test Replace `available` usage with `type -q` Feb 24, 2016
LICENSE Set correct copyright holder in LICENSE Dec 3, 2018
README.md
bundle Use spark for graphs Jul 18, 2016
init.fish Initialize immediately, rather than waiting for an event. Mar 6, 2016

README.md


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 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:

$ 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/s

You 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 1

License

MIT © coderstephen et al

You can’t perform that action at this time.