a simple but detailed weather indicator for Waybar using wttr.in.
Compile yourself using cargo build --release, or download the precompiled binary from the releases page.
For Arch Linux, use the AUR package.
For NixOS, use the NixPkg package.
--ampm- display time in AM/PM format--location STRING- pass a specific location to wttr.in--main-indicator- decide whichcurrent_conditionskey 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° Mistinstead of7° Mist, Overcast 81%, Sunshine 17%, Frost 15%--fahrenheit- use fahrenheit instead of celsius--mph- use mph instead of km/h for wind speed--custom-indicator STRING- optional expression that will be shown instead of main indicator. current_conditions keys surrounded by {} can be used. For example,"{ICON}{temp_C}({FeelsLikeC})"will be transformed to"text":"🌧️0(-4)"in the output--lang LANG- set language (currentlyen,de,pl,tr,fr,ru,zh,be,es,pt,it,ja,uk,sv; submit a PR to add yours)
e.g. wttrbar --date-format "%m/%d" --location Paris --hide-conditions
To display the weather icons correctly, you will need to have a font that supports emojis installed. The screenshot uses Noto Emoji, but you can use other fonts too.
Assuming wttrbar is in your path, it can be used like:
"custom/weather": {
"format": "{}°",
"tooltip": true,
"interval": 3600,
"exec": "wttrbar",
"return-type": "json"
},This code is based on my old Python gist that was used for the same purpose.
