From a76ced9541f6a83a1ee4c1ad181b834f791f2dad Mon Sep 17 00:00:00 2001 From: Clément Sibille Date: Sat, 7 Feb 2026 14:25:41 +0100 Subject: Show the remaining time in red when a tenth of the duration is left --- listimer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/listimer b/listimer index fe5f4c3..4c43b7f 100755 --- a/listimer +++ b/listimer @@ -46,10 +46,10 @@ in ELAPSED_TIME_MIN=$(($ELAPSED_TIME_SEC/60)) REMAINING_TIME_MIN=$(($DURATION_MIN-$ELAPSED_TIME_MIN)) - if [ "$REMAINING_TIME_MIN" -lt "$(($DURATION_MIN / 2))" ]; then - echo "$REMAINING_TIME_MIN minutes" - elif [ "$REMAINING_TIME_MIN" -lt "0" ]; then + if [ $REMAINING_TIME_MIN -lt 0 ]; then echo "TIME OUT!" + elif [ "$REMAINING_TIME_MIN" -lt "$(($DURATION_MIN / 10))" ]; then + echo "$REMAINING_TIME_MIN minutes" else echo "$REMAINING_TIME_MIN minutes" fi -- cgit v1.2.3