From e9a3c08d86f518d20849a5e42ae4444626035071 Mon Sep 17 00:00:00 2001 From: tiyn Date: Thu, 23 May 2024 18:46:03 +0200 Subject: [PATCH] lmc: changed loopback script to be more precise --- .local/bin/etc/sxhkd/audio/lmc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/etc/sxhkd/audio/lmc b/.local/bin/etc/sxhkd/audio/lmc index 9a6978d..90854f9 100755 --- a/.local/bin/etc/sxhkd/audio/lmc +++ b/.local/bin/etc/sxhkd/audio/lmc @@ -6,7 +6,7 @@ [ -z "$LOOPBACK_DEVICE" ] && device="Easy Effects Source" || device="$LOOPBACK_DEVICE" -name=$(wpctl status | grep "$device") +name=$(wpctl status | sed -n '/Sources/,$p' | sed -n '/Filter/q;p' | grep "$device" | sed -e "s/*/\ /g") id=$( echo $name | cut -d '.' -f 1 | cut -c 5-) node=$(wpctl inspect $id | grep node.name | cut -d '=' -f 2)