Finally figure out why volume adjustment wasn't happening first thing, it was in the wrong file. This should finally be resolved once and for all.

This commit is contained in:
Storm Dragon
2025-08-19 16:02:12 -04:00
parent 8a7fb83be3
commit e39c1cedec
2 changed files with 31 additions and 28 deletions

View File

@@ -12,6 +12,35 @@ if ! [[ -x /usr/local/bin/configure-stormux ]]; then
return
fi
# Volume calibration FIRST
echo "Setting up audio volume..."
volume=50
wait=0
# Wait for pipewire to become available
while [[ $wait -lt 30 ]]; do
if pgrep pipewire &> /dev/null ; then
break
else
sleep 1
((wait++))
fi
done
# Volume calibration - this should be the VERY FIRST interactive part
while [[ $volume -le 130 ]]; do
clear
echo "Volume calibration (current: ${volume}%)"
pactl set-sink-volume @DEFAULT_SINK@ "${volume}%" 2>/dev/null
spd-say "If this is loud enough, press enter."
if read -t4 ; then
echo "Volume set to ${volume}%"
break
else
((volume+=5))
fi
done
# For audible sudo prompts:
unset sudoFlags
if [[ -x /etc/audibleprompt.sh ]]; then
@@ -19,6 +48,7 @@ if [[ -x /etc/audibleprompt.sh ]]; then
export sudoFlags=("-A")
fi
clear
cat << "EOF"
Hello, and welcome to Stormux!