diff options
| -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) } |
