summaryrefslogtreecommitdiffstats
path: root/listimer
diff options
context:
space:
mode:
authorClément Sibille <clements@lisible.xyz>2026-02-07 14:25:41 +0100
committerClément Sibille <clements@lisible.xyz>2026-02-07 14:25:41 +0100
commita76ced9541f6a83a1ee4c1ad181b834f791f2dad (patch)
treea64c971296919134be33be08a7b725b9a2f93d95 /listimer
parentac0beeeafd5f9c28565c05e3ed718ac6c509d87c (diff)
Show the remaining time in red when a tenth of the duration is leftHEADmain
Diffstat (limited to 'listimer')
-rwxr-xr-xlistimer6
1 files 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 "<span weight=\"bold\" size=\"larger\" background=\"#FF0000\">$REMAINING_TIME_MIN minutes</span>"
- 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 "<span weight=\"bold\" size=\"larger\" background=\"#FF0000\">$REMAINING_TIME_MIN minutes</span>"
else
echo "$REMAINING_TIME_MIN minutes"
fi
Go back to lisible.xyz