From eb81546609a1decc8e8ac4bc3856b6b17269777d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 16 Nov 2026 17:20:29 +0100 Subject: fix(status): statusctl watch counts status.xbox as gaming The shell ORs status.xbox into presentation, so the CLI reads it too: the watch emits the gaming class and toggle is refused while the Xbox runs a game, as for a PC game. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/status/test-statusctl.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'desktop/modules/status/test-statusctl.sh') diff --git a/desktop/modules/status/test-statusctl.sh b/desktop/modules/status/test-statusctl.sh index 8042fd1..0c51968 100755 --- a/desktop/modules/status/test-statusctl.sh +++ b/desktop/modules/status/test-statusctl.sh @@ -149,6 +149,23 @@ kill "$watcher5" 2>/dev/null wait "$watcher5" 2>/dev/null check "first write, created by link, redraws" "1" "$(grep -c '"class": *"gaming"' "$out5")" +# deck-it writes status.xbox while the Xbox runs a game; it holds +# presentation on the same way, so the watch follows it too. +rm -f "$tmp/status.gaming" "$tmp/status.presentation" +out6="$tmp/watch6.out" +"$ctl" presentation watch > "$out6" 2>/dev/null & +watcher6=$! +sleep 0.3 +printf '1\n' > "$tmp/status.xbox.tmp" +mv -f "$tmp/status.xbox.tmp" "$tmp/status.xbox" +sleep 0.5 +kill "$watcher6" 2>/dev/null +wait "$watcher6" 2>/dev/null +check "xbox game redraws as gaming" "1" "$(grep -c '"class": *"gaming"' "$out6")" +"$ctl" presentation toggle 2>/dev/null +check "toggle refused while the xbox plays" "1" "$?" +rm -f "$tmp/status.xbox" + # quiet is a plain mode like dnd. "$ctl" quiet set 1 check "quiet set 1" "1" "$("$ctl" quiet get)" -- cgit v1.2.3