The sound control on lxpanel only handles one channel. But let’s say I want to control mute/unmute on mic by a handy shortcut! Two handy scripts fixes this, which can be assigned to a keyboard shortcut in Openbox or your preferred WM/DE.

#!/bin/sh
amixer set Mic 80% mute > /dev/null
#!/bin/sh
amixer set Mic 80% unmute > /dev/null

You may of course choose any other control you want – ie PCM:

amixer set PCM 10%+ > /dev/null

Will increase sound by 10%.

2 Responses to “Mute/unmute mic alsamixer in commandline”

  1. firmit Says:

    Oh yeah – the “> /dev/null” suppress the output to the terminal.

  2. Greyson Says:

    Thank you. I have been looking for this information for a couple days now. Once I knew I needed the amixer command, I read the manual page on it and discovered that this can be simplified further. Using the toggle parameter lets you do this with only one script or command:

    #!/bin/bash
    amixer set Mic 80% toggle > /dev/null

    That makes setting up a keyboard shortcut even easier.


Leave a Reply