Conditions
A command line tool for getting the weather conditions at the current location.
Weather Sources
* requires an api key
Installation
At this time it is necessary to compile and install the crate locally. The simplest way to do this is to install the Rust toolchain.
|
Then use cargo to build and install from crates.io
Usage
By default the Open-Meteo weather provider will be used along with a location determined by the machine's ip address.
> conditions |
{
}
Weather API
In order to use the Weather API provider create an account and then an API Key. Then persist the api key in settings.
Location
If you prefer to set a specific location you can do so via a postal code:
For example:
SketchyBar
Here's how I'm using this with SketchyBar.
#!/bin/bash
conditions=""
icon=
temp=
Tasks
Run tasks from this directory via: xc [task-name]
check
build
run
install
Dependencies
| Project | Version |
|---|---|
| rust-lang.org | ^1.6 |
| rust-lang.org/cargo | ^0.66 |
| git-scm.org | ^2.38 |
| xcfile.dev | ^0 |
Why
I wanted to learn rust and had a (cargo-culted) shell script that performed this task for usage with sketchybar.