diff options
Diffstat (limited to 'desktop/modules/status/statusctl')
| -rwxr-xr-x | desktop/modules/status/statusctl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/modules/status/statusctl b/desktop/modules/status/statusctl index 6fbb689..8877ff3 100755 --- a/desktop/modules/status/statusctl +++ b/desktop/modules/status/statusctl @@ -82,12 +82,14 @@ tooltip() { case "$1" in activated) printf '%s: on' "$mode" ;; deactivated) printf '%s: off' "$mode" ;; - down) printf '%s: no state file' "$mode" ;; esac } +# A missing file is the off state, not a distinct condition: read_mode already +# reads it as 0, and this is the same path `get` uses. There is no "down": a +# file cannot report whether a watcher is alive, and a missing one is exactly +# what a fresh session looks like. state_now() { - [[ -e "$file" ]] || { printf 'down'; return; } [[ "$(read_mode)" == "1" ]] && printf 'activated' || printf 'deactivated' } |
