Change to more suitable lock file location for user programs

This commit is contained in:
appeasementPolitik 2023-11-25 09:13:56 +00:00 committed by GitHub
parent 1500ec504e
commit 0afc70a07c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -53,4 +53,4 @@ checkforecast && showweather ||
( until { [ "$(cat /sys/class/net/w*/operstate)" = 'up' ] || [ "$(cat /sys/class/net/e*/operstate)" = 'up' ]; } &&
getforecast; do sleep 60; done &&
pkill -RTMIN+"${1:-5}" "${STATUSBAR:-dwmblocks}" ) &
echo ) 9>/tmp/sb-forecast.lock
echo ) 9>"${XDG_RUNTIME_DIR}/sb-forecast.lock"

View File

@ -13,7 +13,7 @@ addr=$(cat "$ipfile" 2>/dev/null) && addr=$(geoiplookup "$addr" 2>/dev/null) &&
( until { [ "$(cat /sys/class/net/w*/operstate)" = 'up' ] || [ "$(cat /sys/class/net/e*/operstate)" = 'up' ]; } &&
curl -sf api.ipify.org --output "$ipfile"; do sleep 60; done &&
pkill -RTMIN+"${1:-27}" "${STATUSBAR:-dwmblocks}" ) &
echo; exit ) 9>/tmp/sb-iplocate.lock
echo; exit ) 9>"${XDG_RUNTIME_DIR}/sb-iplocate.lock"
name="${addr##*, }"
flag="$(grep "flag: $name" "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji")"
flag="${flag%% *}"

View File

@ -9,7 +9,7 @@ moonfile="${XDG_DATA_HOME:-$HOME/.local/share}/moonphase"
( until { [ "$(cat /sys/class/net/w*/operstate)" = 'up' ] || [ "$(cat /sys/class/net/e*/operstate)" = 'up' ]; } &&
curl -sf "wttr.in/?format=%m" --output "$moonfile" && touch "$moonfile"; do sleep 60; done &&
pkill -RTMIN+"${1:-17}" "${STATUSBAR:-dwmblocks}" ) &
echo; exit ) 9>/tmp/sb-moonphase.lock
echo; exit ) 9>"${XDG_RUNTIME_DIR}/sb-moonphase.lock"
icon="$(cat "$moonfile")"

View File

@ -55,7 +55,7 @@ esac
( until { [ "$(cat /sys/class/net/w*/operstate)" = 'up' ] || [ "$(cat /sys/class/net/e*/operstate)" = 'up' ]; } &&
updateprice; do sleep 60; done &&
pkill -RTMIN+"$4" "${STATUSBAR:-dwmblocks}" ) &
echo; exit ) 9>/tmp/sb-price.lock ||
echo; exit ) 9>"${XDG_RUNTIME_DIR}/sb-price.lock" ||
updateprice
fi