diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-16 17:20:29 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-16 17:20:29 +0100 |
| commit | eb81546609a1decc8e8ac4bc3856b6b17269777d (patch) | |
| tree | 7e5091b8103554d4da72a49e9ff7dbb5e2a90878 /desktop/modules/status/test-statusctl.sh | |
| parent | 6d60c2a0af28afd8bde3fc41c92f759e10845221 (diff) | |
| download | quickshell-eb81546609a1decc8e8ac4bc3856b6b17269777d.tar.gz quickshell-eb81546609a1decc8e8ac4bc3856b6b17269777d.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/status/test-statusctl.sh')
| -rwxr-xr-x | desktop/modules/status/test-statusctl.sh | 17 |
1 files changed, 17 insertions, 0 deletions
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)" |
