4

I'm an arch linux user and I had a dream. Make a keyboard shortcut that will play a rimshot (Ba Dum Tsssss) when pressed.

After some researches it appears that pacmd is the best option to do so, but I have no idea how it works and the man page is empty, and the help lacks clear information... sinks, modules and sources... well, that's all obscure.

Can anybody help me to achieve my goal ?

Lord Vlad
  • 41
  • 4

1 Answers1

4

From the man page:

pacmd set-sink-mute <index> <1|0>

controls the mute-ness of a given sink (sound interface) where <index> is the sink index (listed with pacmd list-sinks) and 1 or 0 indicates muted or not muted, respectively.

You'll likely want to create a short Bash script that would unmute the sink, play your sound, and then remute it; you can then bind this to a key.

Josh Hebert
  • 331
  • 1
  • 5
  • I see, I'll try that, it looks like a good approach to it. But how can I be sure my rimshot is always on the same sink ? Can a script detect all the unmuted sink and mute them, then reverse that later ? – Lord Vlad May 26 '16 at 13:14