pub / sguard

Suspend Guard for the PhoneShell "Phosh"
git clone https://src.jayvii.de/pub/sguard.git
Home | Log | Files | Exports | Refs | README | RSS

commit 66f99a6912aee5cb2688ba76e9c7c276efa2218c
parent 62a678615cf801414c3559967cf8aea06ed7bf0d
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Thu, 30 Dec 2021 16:09:04 +0100

Support both pulseaudio as well as pipewire, thanks to HazardChem

Diffstat:
Msguard/README.md | 1+
Msguard/sguard.sh | 4++--
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sguard/README.md b/sguard/README.md @@ -61,3 +61,4 @@ proposing a solution as well :) ### Contributors - JayVii <jayvii [AT] posteo [DOT] de> (2021) +- HazardChem <pthom44 [AT] live [DOT] com [DOT] au> (2021) diff --git a/sguard/sguard.sh b/sguard/sguard.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# SPDX-FileCopyrightText: 2021 JayVii +# SPDX-FileCopyrightText: 2021 JayVii, 2021 HazardChem # SPDX-License-Identifier: GPL-3.0-or-later # About this header: https://reuse.software @@ -30,7 +30,7 @@ fi # check player state. function check_player_state { - if [[ -z `pacmd list-sink-inputs | grep "state: RUNNING$"` ]]; then + if [[ -z `pacmd list sinks | grep -E "(s|S)tate: RUNNING$"` ]]; then echo false else echo true