Skip to content

Instantly share code, notes, and snippets.

View LiberQuack's full-sized avatar

LiberQuack LiberQuack

  • Brazil
View GitHub Profile
#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