Files
Eww_Widgets/eww/sidebar/scripts/WeatherMini
T
2023-04-24 15:41:27 +05:45

11 lines
229 B
Bash
Executable File

#!/usr/bin/env bash
weather=$(curl -s wttr.in/Kohalpur?format=3)
if [ $(echo "$weather" | grep -E "(Unknown|curl|HTML)" | wc -l) -gt 0 ]; then
echo "WEATHER UNAVAILABLE"
else
echo "$weather" | awk '{print $2" "$3}'
fi