diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast index 2920f914..fd224705 100755 --- a/.local/bin/statusbar/sb-forecast +++ b/.local/bin/statusbar/sb-forecast @@ -7,7 +7,7 @@ url="${WTTRURL:-wttr.in}" weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" # Get a weather report from 'wttr.in' and save it locally. -getforecast() { curl -sf "$url/$LOCATION" --output "$weatherreport"; } +getforecast() { curl -sf "$url/$LOCATION" --output "$weatherreport" && touch "$weatherreport"; } # Forecast should be updated only once a day. checkforecast() { diff --git a/.local/bin/statusbar/sb-moonphase b/.local/bin/statusbar/sb-moonphase index 242a19cf..49201130 100755 --- a/.local/bin/statusbar/sb-moonphase +++ b/.local/bin/statusbar/sb-moonphase @@ -7,7 +7,7 @@ moonfile="${XDG_DATA_HOME:-$HOME/.local/share}/moonphase" [ -s "$moonfile" ] && [ "$(stat -c %y "$moonfile" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] || { [ -z "$(pgrep 'sb-moonphase' | tail -n +3)" ] && ( until { [ "$(cat /sys/class/net/w*/operstate)" = 'up' ] || [ "$(cat /sys/class/net/e*/operstate)" = 'up' ]; } && - curl -sf "wttr.in/?format=%m" --output "$moonfile"; do sleep 60; done && + curl -sf "wttr.in/?format=%m" --output "$moonfile" && touch "$moonfile"; do sleep 60; done && pkill -RTMIN+"${1:-17}" "${STATUSBAR:-dwmblocks}" ) & echo; exit; } diff --git a/.local/bin/statusbar/sb-price b/.local/bin/statusbar/sb-price index fea69b6d..94d25b9a 100755 --- a/.local/bin/statusbar/sb-price +++ b/.local/bin/statusbar/sb-price @@ -28,7 +28,7 @@ filestat="$(stat -c %x "$pricefile" 2>/dev/null)" [ -d "$dir" ] || mkdir -p "$dir" -updateprice() { curl -sf --fail-early $denom.$url/{1$target,$target$interval} --output "$pricefile" --output "$chartfile"; } +updateprice() { curl -sf --fail-early $denom.$url/{1$target,$target$interval} --output "$pricefile" --output "$chartfile" && touch "$pricefile" "$chartfile"; } [ "${filestat%% *}" != "$(date '+%Y-%m-%d')" ] && updateme="1"