myhome/.local/bin/getforecast
Marcin Woźniak b82dc58f26
Added programs
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
2021-03-22 21:27:54 +01:00

17 lines
321 B
Bash
Executable File

#!/bin/sh
# Updates weather forecast
FILE="$HOME/.config/.weatherreport.tmp"
FILER="$HOME/.config/weatherreport"
location="Kleczew"
curl -s --max-time 10 "wttr.in/$location" > $FILE
if [ -s "$FILE" ]
then
mv $FILE $FILER
# notify-send " Weather" "The weather forecast has been updated."
else
rm $FILE
fi