dotfiles/de/home/.config/eww/scripts/widgets/weather
2025-03-12 22:30:02 -07:00

12 lines
343 B
Bash
Executable file

#!/bin/bash
wttr_cache="${HOME}/.cache/wttr.json"
if [[ ! $(find "${wttr_cache}" -cmin -60 -print 2>/dev/null) ]]; then
# echo "File ${wttr_cache} exists and is younger than 60min"
#else
# echo "File ${wttr_cache} does not exists or is younger than 60min"
curl --silent wttr.in/Eugene?format=j1 > "${wttr_cache}"
fi
cat "${wttr_cache}"