add laptop configs

This commit is contained in:
Simon Belmont 2025-03-24 13:00:20 -04:00
parent 9b8dd017d8
commit 47fac581ee
46 changed files with 3332 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# weather.sh
for i in {1..5}
do
text=$(curl -s "https://v2.wttr.in/$1?format=1&m")
if [[ $? == 0 ]]
then
text=$(echo "$text" | sed -E "s/\s+/ /g")
tooltip=$(echo -ne "Santo Domingo, Dominican Republic:";curl -s "https://wttr.in/$1?format=2&m")
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\"}"