From 57d480a93687a71f89a70656c8b1455dd8d81176 Mon Sep 17 00:00:00 2001 From: Makise Kurisu Date: Sat, 4 Apr 2015 21:36:53 +0200 Subject: [PATCH] Added scroll lock indication --- mute_unmute_microphone.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mute_unmute_microphone.sh b/mute_unmute_microphone.sh index ac5d2ec..bfbb7d1 100644 --- a/mute_unmute_microphone.sh +++ b/mute_unmute_microphone.sh @@ -1,8 +1,12 @@ #!/bin/bash -# Copy this directly into the gnome shortcut manager. -# Depends: alsa-utils -# -# Name: Mute/Unmute Microphone +# Function : Mute/Unmute Microphone +# Depends : alsa-utils -bash -c "notify-send \"Microphone\" \"The microphone is now `amixer set Capture toggle | grep \"Front\" | tail -n 1 | sed -e 's/.*\[\(.*\)\]/\1/'`.\" ---hint int:transient:1 --icon=file:///usr/share/icons/Adwaita/scalable/devices/audio-input-microphone-symbolic.svg" +# Copy this directly into the gnome shortcut manager: +# bash -c "notify-send \"Microphone\" \"The microphone is now `amixer set Capture toggle | grep \"Front\" | tail -n 1 | sed -e 's/.*\[\(.*\)\]/\1/'`.\" --hint int:transient:1 --icon=file:///usr/share/icons/Adwaita/scalable/devices/audio-input-microphone-symbolic.svg" + +# Or link in this script to also toggle the SCROLL-Lock LED. (on when muted) +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