dotfiles/.config/waybar/scripts/wittr.sh
2025-12-18 12:09:34 -03:00

5 lines
214 B
Bash

#!/usr/bin/sh
req=$(curl -s wttr.in/CITY?format="%t|%l+(%c%f)+%h,+%C")
bar=$(echo $req | awk -F "|" '{print $1}')
tooltip=$(echo $req | awk -F "|" '{print $2}')
echo "{\"text\":\"$bar\", \"tooltip\":\"$tooltip\"}"