diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-03 09:39:28 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-03 09:39:28 +0200 |
| commit | 7e374c5636f4e7a61035d8e4bd499238c27cee6b (patch) | |
| tree | e24e51a9359d7ff2678db489349e0c36b6d609e3 | |
| parent | 8c5bdf378b8c80cc8b2fea717805c0b5fb03e070 (diff) | |
| download | quickshell-7e374c5636f4e7a61035d8e4bd499238c27cee6b.tar.gz quickshell-7e374c5636f4e7a61035d8e4bd499238c27cee6b.zip | |
feat(status): present during a Teams call
The auto-detector now sets presentation while Teams holds a mic stream,
alongside the game checks. Teams runs for the whole session, so its
process alone is no signal and would have kept lock, DND and the
breaktimer off all day. A call is Teams holding a source-output, which
pactl lists tagged with application.process.binary = "teams-for-linux";
verified matching during a live call.
It reuses status.gaming rather than status.presentation, so a call
ending clears only the automatic half and never a manual toggle. The
statusctl tooltip for that state said "game running", which is now
wrong, so it reads "auto: game or call". The file and waybar class keep
the gaming name: renaming them touches four places for no behaviour
change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rwxr-xr-x | desktop/modules/status/statusctl | 2 | ||||
| -rw-r--r-- | shared/Status.qml | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/desktop/modules/status/statusctl b/desktop/modules/status/statusctl index 531951b..839377e 100755 --- a/desktop/modules/status/statusctl +++ b/desktop/modules/status/statusctl @@ -82,7 +82,7 @@ tooltip() { case "$1" in activated) printf '%s: on' "$mode" ;; deactivated) printf '%s: off' "$mode" ;; - gaming) printf '%s: on (game running)' "$mode" ;; + gaming) printf '%s: on (auto: game or call)' "$mode" ;; esac } diff --git a/shared/Status.qml b/shared/Status.qml index e1d0d17..0548f53 100644 --- a/shared/Status.qml +++ b/shared/Status.qml @@ -180,6 +180,10 @@ Singleton { // either under gamescope or directly, and the DuckStation and PCSX2 emulators // run standalone, so all four are tested and any one is enough. // + // A Teams call presents too. Teams runs all session, so its process is no + // signal; a call is Teams holding a mic stream, which pactl lists as a + // source-output tagged with its binary. Outside a call it holds none. + // // The steam pattern is bracketed so it cannot match this very command // line: pgrep -f reads the whole argv, and the literal "steamapps/common" // here would otherwise match the sh running the check and report a game @@ -189,7 +193,7 @@ Singleton { Process { id: gameProc command: ["sh", "-c", - "pgrep -x gamescope >/dev/null 2>&1 || pgrep -f 'steamapps/commo[n]' >/dev/null 2>&1 || pgrep -x duckstation-qt >/dev/null 2>&1 || pgrep -x pcsx2-qt >/dev/null 2>&1"] + "pgrep -x gamescope >/dev/null 2>&1 || pgrep -f 'steamapps/commo[n]' >/dev/null 2>&1 || pgrep -x duckstation-qt >/dev/null 2>&1 || pgrep -x pcsx2-qt >/dev/null 2>&1 || pactl list source-outputs 2>/dev/null | grep -q 'application.process.binary = \"teams-for-linux\"'"] onExited: code => root.setGaming(code === 0) } |
