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:
@@ -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!
|
||||
|
||||
|
Reference in New Issue
Block a user