weather tooltip information

This commit is contained in:
steven 2025-04-19 18:37:11 -04:00
parent cc2c37ef8f
commit 58704035dd
2 changed files with 7 additions and 1 deletions

View file

@ -21,11 +21,14 @@
"mpris":{ "mpris":{
"interval":1, "interval":1,
"format":"{dynamic}", "format":"{dynamic}",
"dynamic-len":44,
"dynamic-importance-order":["title","position","length","artist","album"],
"tooltip":false "tooltip":false
}, },
"custom/weather":{ "custom/weather":{
"interval":600, "interval":600,
"exec":"curl 'https://wttr.in/?m&format=%C+(%t)'" "return-type":"json",
"exec":"~/.config/waybar/scripts/wttr.sh"
}, },
"network#warp":{ "network#warp":{
"interval":5, "interval":5,

3
waybar/scripts/wttr.sh Executable file
View file

@ -0,0 +1,3 @@
wttr=$(curl -s "https://wttr.in/Louisville?m&format=%t")
tooltip=$(curl -s "https://wttr.in/Louisville?m&format=<u>%C</u>:RealFeel+%f:UV+Index+%u:Precip.+%p:Wind+%w"|sed 's/:/\\n/g')
echo -E "{\"text\":\"$wttr\",\"tooltip\":\"$tooltip\"}"