A simple program to monitor a PulseAudio server for clients, and run arbitrary commands when particular named clients connect or disconnect.
This program is useful for the user who wants to pause their music player or mute a channel on their sound card when browsing a web page with audio or using voice chat.
The inspiration for this utility came from a B3ta newsletter:
Things we'd really like to see include
* INTERNET VOLUME MIXER - we're eternally
frustrated by having to turn iTunes on and off
as internet videos demand our attention. Can
someone write a hack that mixes the music down
and back up automatically?
To display help:
To pause/resume Rhythmbox when Firefox is playing sounds:
paclientmonitor -n 'ALSA plug-in [firefox]' \
-c 'rhythmbox-client --no-start --pause' \
-d 'rhythmbox-client --no-start --play'
To discover the client name to pass: