Compile with cargo build --release
and copy the resulting .so file from target/release/libanyrun_weather.so
to ~/.config/anyrun/plugins
Write the config in the following fashion:
Config file:
~/.config/anyrun/weather.ron
Config format:
Config(
use_ip_location: {true|false},
prefix: "{your preferred prefix}",
weather_location: GeoLocation(
lon: {longitude for your location},
lat: {latitude for your location}
),
openweatherapi_key: "{your OpenWeatherApi key}",
units: {your preferred units: Metric|Imperial|Standard}
)
Example:
Config(
use_ip_location: false,
prefix: "wttr",
weather_location: Coord(
lon: 0.0,
lat: 0.0
),
openweatherapi_key: "{removed for privacy}",
units: Metric
)