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
|
return
|
||||||
fi
|
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:
|
# For audible sudo prompts:
|
||||||
unset sudoFlags
|
unset sudoFlags
|
||||||
if [[ -x /etc/audibleprompt.sh ]]; then
|
if [[ -x /etc/audibleprompt.sh ]]; then
|
||||||
@@ -19,6 +48,7 @@ if [[ -x /etc/audibleprompt.sh ]]; then
|
|||||||
export sudoFlags=("-A")
|
export sudoFlags=("-A")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
clear
|
||||||
cat << "EOF"
|
cat << "EOF"
|
||||||
Hello, and welcome to Stormux!
|
Hello, and welcome to Stormux!
|
||||||
|
|
||||||
|
@@ -24,34 +24,7 @@ if [[ -x /opt/configure-stormux/configure-stormux.sh ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wait for pipewire to become available and set volume
|
# Volume calibration is now handled in stormux_first_boot.sh
|
||||||
echo "Waiting for audio system to initialize..."
|
|
||||||
volume=50
|
|
||||||
wait=0
|
|
||||||
|
|
||||||
while [[ $wait -lt 30 ]]; do
|
|
||||||
if pgrep pipewire &> /dev/null ; then
|
|
||||||
echo "Audio system ready. Setting up volume..."
|
|
||||||
break
|
|
||||||
else
|
|
||||||
sleep 1
|
|
||||||
((wait++))
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Volume calibration - this should be the 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
|
|
||||||
|
|
||||||
export DIALOGOPTS='--insecure --no-lines --visit-items'
|
export DIALOGOPTS='--insecure --no-lines --visit-items'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user