From 7e374c5636f4e7a61035d8e4bd499238c27cee6b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 3 Oct 2026 09:39:28 +0200 Subject: 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 --- shared/Status.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'shared/Status.qml') 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) } -- cgit v1.2.3