wttrbar
a simple but detailed weather indicator for Waybar using wttr.in.
Installation
Compile yourself using cargo build --release
, or download the precompiled binary from the releases page.
For Arch Linux, use the AUR package.
Usage
--ampm
- display time in AM/PM format--location
- pass a specific location to wttr.in--main-indicator
- decide whichcurrent_conditions
key will be shown on waybar. defaults totemp_C
--date-format
- defaults to%Y-%m-%d
, formats the date next to the days. see reference--hide-conditions
- show a shorter descrpition next to each hour, like7° Mist
instead of7° Mist, Overcast 81%, Sunshine 17%, Frost 15%
--fahrenheit
- use fahrenheit instead of celsius
e.g. wttrbar --date-format "%m/%d" --location Paris --hide-conditions
Waybar configuration
Assuming wttrbar
is in your path, it can be used like:
"custom/weather": {
"format": "{} °",
"tooltip": true,
"interval": 3600,
"exec": "wttrbar",
"return-type": "json"
},
Old version
This code is based on my old Python gist that was used for the same purpose.