cli to mute one application
This isn't the biggest deal in the world, but I wanted to toggle a single program's audio without having to navigate the pulseaudio menus/applications. I wanted to mute Civ2.
files/2025/listings/mute-one-application.sh (Source)
1 2 3 |
#!/bin/sh index="$( pactl --format=json list sink-inputs | jq ".[]? | select(.properties.\"application.name\" | startswith(\"civ2\")) | .index" ) pactl set-sink-input-mute "${index}" toggle |
Find the sink-input associated with the exact process I am interested in, and then toggle the mute.
Comments