add sway, waybar and rofi config

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
2024-06-07 18:18:06 +05:30
parent 3a0c68b8d9
commit c946a5f4cf
10 changed files with 1200 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# get_weather.sh
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\"}"