1
0
Fork 0

mx-update-np: make it loop every 10s

This commit is contained in:
tastytea 2024-04-04 13:36:04 +02:00
parent bd3022bb04
commit 92ffb65da4
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 10 additions and 6 deletions

View File

@ -4,9 +4,13 @@
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
local np=$(np-subsonic)
if [[ -n "${np}" ]]; then
mx-set-status "np: $(np-subsonic)"
else
mx-set-status
fi
local np
while sleep 10; do
np=$(np-subsonic)
if [[ -n "${np}" ]]; then
mx-set-status "np: $(np-subsonic)"
else
mx-set-status
fi
done