Initial
This commit is contained in:
commit
c8734e660a
392 changed files with 21043 additions and 0 deletions
17
.config/waybar/scripts/weather.sh
Normal file
17
.config/waybar/scripts/weather.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
text=$(curl -s "https://wttr.in/$1?format=%c+%f+%m")
|
||||
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
text=$(echo "$text" | sed -E "s/\s+/ /g")
|
||||
tooltip=$(curl -s "https://wttr.in/$1?format=%l:+%C+%c+%t+%w+%m")
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
|
||||
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "{\"text\":\"Service Unavailable\", \"tooltip\":\"Service Unavailable\"}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue