This commit is contained in:
ange 2025-07-21 13:08:28 +00:00
parent 17b03778ac
commit 5f1b118ff3
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
26 changed files with 164 additions and 160 deletions

View file

@ -24,13 +24,8 @@ case "$1" in
*) exit 1 ;;
esac
dev="$(getdev "${CLASS,,}")"
if [ -n "$dev" ]; then
devs="$(getdevs "$CLASS" | grep -v "$dev")"$'\n'"* $dev"
else
devs="$(getdevs "$CLASS")"
read -r id <<< "$(getdevs "$CLASS" | sed "s/^\($(getdev "${CLASS,,}")\)$/* \1/" | dmenu -l 16 | sed 's/* //')"
if [ -n "$id" ]; then
wpctl set-default "$id"
touch "$XDG_RUNTIME_DIR/sbar/vol"
fi
read -r id <<< "$(dmenu -l 16 <<< "$devs" | sed 's/*//')"
wpctl set-default "$id"
touch "$XDG_RUNTIME_DIR/sbar/vol"