dotfiles/waybar/scripts/wttr.sh

3 lines
239 B
Bash
Executable file

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\"}"