max 1 second
This commit is contained in:
parent
fcada67622
commit
329e8066ea
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue