Ability to act on all sinks?
tfheen opened this issue · comments
Tollef Fog Heen commented
I'm using pulsemixer to mute when the screen locker activates (and unmute when it deactivates). This works fine as long as there is only a single sink, since --mute
and --unmute
will just act on that. It would be quite useful if there was an easy way to mute or unmute all sinks, not just a specific one.
Javier Lopez commented
Yes I agree profusely, It would be great to specify an id "all" which executes the action on all available sinks.
yourealwaysbe commented
I am currently using this slightly unweildy script to achieve similar. The first argument is either "Source" or "Sink" and the remaining arguments are the commands to execute.
#!/bin/zsh
prefix="$1"
shift
args="$@"
pulsemixer $(\
pulsemixer --list |\
rg "^$prefix:" |\
awk -v args="$args" '{
gsub(/,$/,"",$3);
cmdargs = cmdargs"--id "$3" "args" "
} END {
print cmdargs
}'
)