pasink, making PulseAudio sink management less painful

I have three sound cards (on-board, HDMI, and external) and the only sane way to manage them was through pavucontrol. pavucontrol is amazing, but I wanted a command-line app that I can use in keyboard shortcuts and udev rules.

This bothered me enough that I created one myself. If you’re interested, check out pasink (direct link to code). It’s a Python wrapper to pacmd, the PulseAudio console. I’ve thought of using libpulse through Vala, but it’s probably overkill for now.

The script lets you do things like setting volume on each card and setting a particular card as the main output device. I suppose doing the same on input devices would be useful, but I skillfully dodged that responsibility by naming the app “pasink”. It’s not that I don’t see the value; I simply don’t have the motivation.

If you want to extend pasink to also cover audio sources, feel free. You’ll have to rework the interface; perhaps let the behaviour depend on whether the program is run as “pasink” or “pasource”.

Note: By commenting, you grant me permission to freely republish your comment.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.