Open WhyNotHugo opened 7 years ago
I'm using this bash script as a workaround, for anybody interested.
#!/bin/sh
set -x
set -e
if [ -z $1 ]; then
true
elif [ $1 == decrease ]; then
COMMAND="decrease 3"
elif [ $1 == increase ]; then
COMMAND="increase 3"
elif [ $1 == min ]; then
COMMAND="set-volume 0"
elif [ $1 == max ]; then
COMMAND="set-volume 100"
elif [ $1 == toggle ]; then
COMMAND="toggle"
else
echo "Bad argument"
exit -1
fi
if [ -z "$COMMAND" ]; then
true # No command to run
else
for dev in $(ponymix --sink --short list | cut -f 3); do
ponymix -d $dev $COMMAND
done
fi
For me, your script mutes all sinks. To mute all sources (microphones), I use:
for dev in $(ponymix --source --short list | cut -f 3); do
ponymix --source -d $dev mute
done
I'd like to mute/unmute all microphones together (the same applies to volume control, etc).
Right now, this does not seem to be trivially possible. I need to wrap ponymix and:
ponymix list-cards-short --source
ponymix -c $CARD --source mute
An
--all-cards
flag that does this (rather than just work on the default one) would be really really useful.