This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#FORCE MIC VOLUME | |
cat <<'EOF' >> ~/.bashrc | |
### Want to see if linux is gonna change mic volume!!! | |
export MICVOLUME=35 | |
export MICCALC=$(bc <<< "scale=2; 65535 * ($MICVOLUME / 100)" | grep -oP '^\d+') | |
while sleep 0.25; do | |
export MICNAME=$(pacmd list-sources | grep -zoP '\*.*\n.*name.*<(.+)>' | grep -zoP '<.*>' | grep -UzoP '[^<>]' | tr -d '\n') | |
pacmd set-source-volume $MICNAME $MICCALC | |
done | |
EOF |