nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

mics (376B)


      1 #!/bin/bash
      2 
      3 mics=(
      4 	"Family 17h/19h HD Audio Controller Stereo Microphone"
      5 	"Family 17h/19h HD Audio Controller Digital Microphone"
      6 )
      7 
      8 for mic in "${mics[@]}"; do
      9 	mic_id=$(wpctl status | grep -F "$mic" | grep -o '[0-9]\+' | head -1)
     10 	if [ -n "$mic_id" ]; then
     11 		echo "Setting $mic ($mic_id) volume to 0"
     12 		wpctl set-volume "$mic_id" 0
     13 	else
     14 		echo "$mic not found"
     15 	fi
     16 done