From 469515a86b842e6d41244fd7802571bf48b0ded6 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Fri, 26 Jun 2015 08:46:42 +0200 Subject: [PATCH] Schlafzeit der Uhr auf maximal 10 sekunden begrenzt. --- scripts/bar.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/bar.sh b/scripts/bar.sh index 315e0f6..b8a552c 100755 --- a/scripts/bar.sh +++ b/scripts/bar.sh @@ -124,6 +124,9 @@ clock() { info=$(date +"%H:%M") #Bad hack: convert to int to remove leading 0s seconds_to_wait=$[ 61 - $(date +"%S" | awk '{print int($0)}') ]; + if [ "$seconds_to_wait" -gt 10 ]; then + seconds_to_wait=10 + fi echo clock "%{A:I "clock 1061":}$icon_clock $info%{A}" > $FIFO; sleep $seconds_to_wait