feat: restructured some stuff for user1

This commit is contained in:
Nick 2025-03-13 17:24:51 -05:00
parent 8e918f915c
commit cfdf20a39c
76 changed files with 233 additions and 99 deletions

View file

@ -38,6 +38,14 @@ in
"./justfile" = {
source = ./files/justfile;
};
"./.config/scripts/get_weather.sh" = {
source = ./files/get_weather.sh;
executable = true;
};
".config/wallpaper" = {
source = ./files/wallpaper;
recursive = true;
};
};
sessionVariables = { };
};

View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
for i in {1..5}
do
text=$(curl -s "https://wttr.in/$1?format=1")
if [[ $? == 0 ]]
then
text=$(echo "$text" | sed -E "s/\s+/ /g")
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\"}"