From 768fd0ffdebddd88f4927679af78bc7f9837d8ea Mon Sep 17 00:00:00 2001 From: levasseur Date: Fri, 17 Dec 2021 16:43:18 +0100 Subject: [PATCH] display.sh: made separator() more harmonious --- lib/display.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/display.sh b/lib/display.sh index d1f5c32..7ffe37b 100644 --- a/lib/display.sh +++ b/lib/display.sh @@ -131,6 +131,9 @@ separator() echo -ne "$BYellow" local i=0 declare -li length=$(( $(tput cols) - 1 )) + if [[ $length -gt 80 ]]; then + length=$(( $length - (($length - 80) / 2) )) + fi for i in $(seq 1 $length); do echo -n "-" done