From 329e8066ea2295cba65c73a744550484a6e5296b Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 2 Apr 2023 21:21:28 +0200 Subject: [PATCH] max 1 second --- modules/module_weather | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/module_weather b/modules/module_weather index 57938df..bb75b06 100755 --- a/modules/module_weather +++ b/modules/module_weather @@ -9,8 +9,8 @@ module_config command -v curl > /dev/null || exit # weather data -DATA1="$(curl -s wttr.in/?format="%C")" -DATA2="$(curl -s wttr.in/?format=3 | sed 's/.* //; s/.*\(.....\)/\1/')" +DATA1="$(curl -m 1 -s wttr.in/?format="%C")" +DATA2="$(curl -m 1 -s wttr.in/?format=3 | sed 's/.* //; s/.*\(.....\)/\1/')" # if no internet connection/it failed to download [ -z "$DATA1" ] && printf "No internet connection.\n" > /tmp/module_weather_log && exit 1 @@ -63,7 +63,7 @@ CLICK() { # check value of button case "$BUTTON" in - "3") $TERMINAL "clear ; curl -s wttr.in | head -n 38 | tail -n 37 ; read a ; return " ;; + "3") $TERMINAL "clear ; curl -m 1 -s wttr.in | head -n 38 | tail -n 37 ; read a ; return " ;; esac # send the notification