From 35fbdca3bde6c96a0b71c217b7bea158c56c5235 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 12 Mar 2022 15:47:26 -0600 Subject: [PATCH] changes to pipewire.sh --- .local/scripts/pipewire.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.local/scripts/pipewire.sh b/.local/scripts/pipewire.sh index 4ab80b4..e92d4e6 100755 --- a/.local/scripts/pipewire.sh +++ b/.local/scripts/pipewire.sh @@ -3,9 +3,6 @@ #programs to run to initialize pipewire, separated by spaces PROGS="pipewire pipewire-pulse wireplumber" -#program to check to see if script is already running, should be one of the above programs -CHK_PROG="wireplumber" - trap 'kill' 2 trap 'kill' 15 @@ -17,13 +14,12 @@ kill() { done } -if [ -z "$(pgrep $CHK_PROG)" ]; then - for PRG in $PROGS - do - "$PRG" & - sleep 1 - done +for PRG in $PROGS +do - wait -fi + [ -z "$(pgrep "^$PRG\$")" ] && "$PRG" & + sleep 1 +done + +wait