← Back to team overview

torios-dev team mailing list archive

XF86AudioMicMute - make it mute/unmute from a script

 

Hi all,

I have a computer with the XF86AudioMicMute key (never had this before)

So, after a while of thinking it would be nice to have it work, I
decided to make it work.  So now ToriOS has a little script for it.

in line with the other audio scripts (though they support both pulse
audio and alsamixer)

amixer-mic-mute

here's the code if you want to use it for your own desktop (or if you
find someone who needs this later)

if [[ -n $(which pactl) ]] && [[ -n $(pgrep pulseaudio) ]]
then
  pactl set-source-mute 1 toggle
else
  amixer set Capture toggle
fi

And here is the JWM code:
<Key key="XF86AudioMicMute">exec:amixer-mic-mute</Key>

Just figured I'd post this, as the archive is searchable, so this might
come in handy for someone else, not just us ToriOSisdores :D

-- 
Regards