luca-awesome-dotfiles/home/.config/awesome/signals/weather_script.sh
2022-11-22 13:25:44 +01:00

9 lines
189 B
Bash
Executable file

#!/bin/sh
# This script is used to find weather
city=$1
weather=$(curl -sf "wttr.in/$city?format='%C:%f'")
if [[ ! -z $weather ]]; then
echo $weather
else
echo "Weather unavailable"
fi