Pipewire script
This commit is contained in:
parent
26c12af868
commit
bc93160b71
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
LAUNCHER_CMD="fuzzel --dmenu"
|
||||
DEVICES=$(pactl list sinks short | awk '{print $2}')
|
||||
|
||||
SELECTED_OPTION=$(echo "$DEVICES" | ${LAUNCHER_CMD})
|
||||
|
||||
i=1
|
||||
while [ "$i" -le $(echo "$DEVICES" | wc -l) ]; do
|
||||
device=$(echo "$DEVICES" | head -n${i} | tail +${i})
|
||||
echo $(test "$device" = "$SELECTED_OPTION")
|
||||
if $(test "$device" = "$SELECTED_OPTION"); then
|
||||
pactl set-default-sink "$device"
|
||||
fi
|
||||
i=$(expr $i + 1 )
|
||||
done
|
Loading…
Reference in New Issue