My dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
449 B

  1. #!/bin/sh
  2. card=$(aplay -l | grep Analog | awk '{print $2}' | head -c-2)
  3. if [ "$(amixer -c"$card" get "Capture" | grep -c "\[on\]")" -gt 0 ]; then
  4. [ $# -ge 1 ] && amixer -c"$card" set 'Capture' nocap
  5. [ $# -ge 1 ] && notify-send -t 700 -i "mic-off" "Microphone Muted!"
  6. printf ""
  7. else
  8. [ $# -ge 1 ] && amixer -c"$card" set 'Capture' cap
  9. [ $# -ge 1 ] && notify-send -t 700 -i "mic-on" "Microphone Activated!"
  10. printf ""
  11. fi