move scripts to scripts repo

This commit is contained in:
2025-03-16 18:59:53 -07:00
parent c326a20a99
commit fac34d4a8f
6 changed files with 6 additions and 330 deletions

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env bash
for _ in {1..5}; do
text="$(curl -s "https://wttr.in/$1?format=1" | sed -E "s/\s+/ /g")"
if [[ "$?" = 0 ]]; then
# text="$(echo "$text" | awk '{print $2}')"
tooltip=$(curl -s "https://wttr.in/$1?format=4")
if [ "$?" = 0 ]; then
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
exit
fi
fi
sleep 2
done
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"

1
scripts/wttr.sh Symbolic link
View File

@@ -0,0 +1 @@
../../../projects/scripts/waybar/wttr.sh