fix: оставить только один звуковой сигнал при ctx=60%
timeout возвращает код 124 при обрезке, что запускало fallback-цепочку. Заменил || на ; true чтобы подавить код выхода timeout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,9 +69,7 @@ if [ -n "$ctx_pct" ]; then
|
|||||||
if [ ! -f "$alert_file" ] || [ "$(cat "$alert_file")" != "alerted" ]; then
|
if [ ! -f "$alert_file" ] || [ "$(cat "$alert_file")" != "alerted" ]; then
|
||||||
mkdir -p "$HOME/.cache/ai-setup"
|
mkdir -p "$HOME/.cache/ai-setup"
|
||||||
echo "alerted" > "$alert_file"
|
echo "alerted" > "$alert_file"
|
||||||
(timeout 1s paplay /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga 2>/dev/null || \
|
(timeout 1s paplay /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga 2>/dev/null; true) &
|
||||||
paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga 2>/dev/null || \
|
|
||||||
printf '\a') &
|
|
||||||
fi
|
fi
|
||||||
elif [ "$ctx_int" -lt 50 ]; then
|
elif [ "$ctx_int" -lt 50 ]; then
|
||||||
rm -f "$alert_file" 2>/dev/null
|
rm -f "$alert_file" 2>/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user