Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to act on all sinks? #50

Open
tfheen opened this issue May 4, 2020 · 2 comments
Open

Ability to act on all sinks? #50

tfheen opened this issue May 4, 2020 · 2 comments

Comments

@tfheen
Copy link

tfheen commented May 4, 2020

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.

@muniter
Copy link

muniter commented May 6, 2020

Yes I agree profusely, It would be great to specify an id "all" which executes the action on all available sinks.

@yourealwaysbe
Copy link

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
    }'
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants