minor improvements

This commit is contained in:
Florian Schlegel 2020-08-23 17:57:46 +02:00
parent 13f4b3f182
commit 54fe2c2865
1 changed files with 3 additions and 8 deletions

View File

@ -168,7 +168,7 @@ draw_logo_time()
LOGO_TIME=("${LOGO_S[@]}")
for((k=1; k<6; k++)); do
append_five_line_symbol LOGO_TIME $(echo "$(date --date="@$TIME" +"%H:%M")" | cut -b"$k")
append_five_line_symbol LOGO_TIME "$(date --date="@$TIME" +"%H:%M" | cut -b"$k")"
done
_MYOUTPUT="$_MYOUTPUT""\\n\\n""${LOGO_TIME[0]}""\\n""${LOGO_TIME[1]}""\\n""${LOGO_TIME[2]}""\\n""${LOGO_TIME[3]}""\\n""${LOGO_TIME[4]}""\\n""${LOGO_TIME[5]}"
}
@ -216,13 +216,8 @@ while true; do
done
MILLIS=$((${ACDEPS[$i]} - STATION_NOW))
[ "$MILLIS" -lt 0 ] && MILLIS=0
SEKS=$((MILLIS / 1000))
MILLIS=$((MILLIS % 1000))
MINS=$((SEKS / 60))
SEKS=$((SEKS % 60))
MINSSPACE=""
SEKSSPACE=""
MILLISSPACE=""
SEKS=$((MILLIS / 1000)); MILLIS=$((MILLIS % 1000)); MINS=$((SEKS / 60)); SEKS=$((SEKS % 60))
MINSSPACE=""; SEKSSPACE=""; MILLISSPACE=""
[ "$MINS" -lt 100 ] && MINSSPACE=" "
[ "$MINS" -lt 10 ] && MINSSPACE=" "
[ "$SEKS" -lt 10 ] && SEKSSPACE=" "