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