shortcuts/mute_unmute_microphone.sh

9 lines
411 B
Bash
Raw Normal View History

2015-04-03 18:57:21 +02:00
#!/bin/bash
2015-04-04 21:36:53 +02:00
# Function : Mute/Unmute Microphone
# Depends : alsa-utils
2015-04-03 18:57:21 +02:00
2015-04-04 21:36:53 +02:00
onoff=$(amixer set Capture toggle | grep 'Front' | tail -n 1 | sed -e 's/.*\[\(.*\)\]/\1/');
dash=$(if [ "$onoff" == 'on' ]; then echo -ne '-'; fi);
xset ${dash}led;
notify-send "Microphone" "The microphone is now $onoff." --hint int:transient:1 --icon=file:///usr/share/icons/Adwaita/scalable/devices/audio-input-microphone-symbolic.svg