feat: set defalt microphone

This commit is contained in:
Klesh Wong 2022-10-23 22:34:14 +08:00
parent 81901c3d0f
commit 3b7b6339c2

View File

@ -27,6 +27,12 @@ if [ -n "$HDMI_SINK" ]; then
pactl set-default-sink "$HDMI_SINK"
fi
# prioritize condense microphone input
CONDENSER_SOURCE=$(pactl list short sources | awk '{print $2}' | grep Condenser)
if [ -n "$CONDENSER_SOURCE" ]; then
pactl set-default-source "$CONDENSER_SOURCE"
fi
# fix pulseaudio echo-cancel side effect
pactl set-source-volume @DEFAULT_SOURCE@ 100%