fix: оставить только один звуковой сигнал при ctx=60%

timeout возвращает код 124 при обрезке, что запускало fallback-цепочку.
Заменил || на ; true чтобы подавить код выхода timeout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 15:57:37 +03:00
parent ac64bb1505
commit a21a77723c

View File

@@ -69,9 +69,7 @@ if [ -n "$ctx_pct" ]; then
if [ ! -f "$alert_file" ] || [ "$(cat "$alert_file")" != "alerted" ]; then
mkdir -p "$HOME/.cache/ai-setup"
echo "alerted" > "$alert_file"
(timeout 1s paplay /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga 2>/dev/null || \
paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga 2>/dev/null || \
printf '\a') &
(timeout 1s paplay /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga 2>/dev/null; true) &
fi
elif [ "$ctx_int" -lt 50 ]; then
rm -f "$alert_file" 2>/dev/null