From 8d313e16f1bfb537dd53d0e3a3c5641836d489e1 Mon Sep 17 00:00:00 2001 From: Florian Schlegel Date: Sun, 6 Sep 2020 03:34:43 +0200 Subject: [PATCH] modify text box dimensions to accommodate longer station names --- departure.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/departure.sh b/departure.sh index ed3706d..e16540b 100755 --- a/departure.sh +++ b/departure.sh @@ -256,15 +256,15 @@ print_cvag_schedule() MYOUTPUT[$j]="${MYOUTPUT[$j]}\n\n\ \t\t┌─────────────────────────┬────────────────────────────────┐ \n\ \t\t│ ${STATION_NAME[$THIS_STATION_ID]}$(printf "%-$((24-${#STATION_NAME[$THIS_STATION_ID]}))s" "")│ Stand: $THISDATE $CACHE_WARN │\n\ -\t\t├────────────────────┬────┴┬───────────────────────────────┤\n" +\t\t├─────────────┬─────┬─────┴────────────────────────────────┤\n" for ((i=0; i<"${#STATION_LINES[*]}"; i++)); do MILLIS=$((${STATION_ACTUAL_DEPARTURE[$i]} - STATION_NOW)); [ "$MILLIS" -lt 0 ] && MILLIS=0 SEKS=$((MILLIS / 1000)); MINS=$((SEKS / 60)); SEKS=$((SEKS % 60)) MYOUTPUT[$j]="${MYOUTPUT[$j]}\ -\t\t│$(printf "%-$((3-${#MINS}))s" "")$MINS min $(printf "%-$((2-${#SEKS}))s" "")$SEKS s │ $(printf "%-$((3-${#STATION_LINES[$i]}))s" "")${STATION_LINES[$i]} │ ${STATION_DESTINATIONS[$i]}$(printf "%-$((29-${#STATION_DESTINATIONS[$i]}))s" "") │\\n" +\t\t│$(printf "%-$((3-${#MINS}))s" "")$MINS min $(printf "%-$((2-${#SEKS}))s" "")$SEKS s │ $(printf "%-$((3-${#STATION_LINES[$i]}))s" "")${STATION_LINES[$i]} │ ${STATION_DESTINATIONS[$i]}$(printf "%-$((36-${#STATION_DESTINATIONS[$i]}))s" "") │\\n" done MYOUTPUT[$j]="${MYOUTPUT[$j]}\ -\t\t└────────────────────┴─────┴───────────────────────────────┘" +\t\t└─────────────┴─────┴──────────────────────────────────────┘" fi fi done