From c99814393318be6a7c5c4f291e29f0f22e03f240 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 25 Aug 2024 12:03:48 +0200 Subject: [PATCH] banner/chars --- spcd/main.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/spcd/main.sh b/spcd/main.sh index c66e9d9..a902f05 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -1097,6 +1097,11 @@ spcd_fill() { # │ internal │ banner │ # ╰──────────┴────────╯ +SPCD_BANNER=1 +SPCD_BANNER_HORIZONTAL="─" +SPCD_BANNER_DOWN_AND_HORIZONTAL="┬" +SPCD_BANNER_UP_AND_HORIZONTAL="┴" + spcd_banner() { spcd_banner_unset spcd_banner_open @@ -1126,7 +1131,9 @@ spcd_banner_add() { if [ -n "${1}" ]; then spcd_ba__text=" ${1} " spcd_ba__length=${#spcd_ba__text} - spcd_ba__filler="$(spcd_fill "${spcd_ba__length}" ─)" + spcd_ba__filler="$( + spcd_fill "${spcd_ba__length}" "${SPCD_BANNER_HORIZONTAL}" + )" spcd_banner_append \ "${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}" fi @@ -1156,7 +1163,10 @@ spcd_banner_open() { } spcd_banner_split() { - spcd_banner_append "┬" "${SPCD_VERT}" "┴" + spcd_banner_append \ + "${SPCD_BANNER_DOWN_AND_HORIZONTAL}" \ + "${SPCD_VERT}" \ + "${SPCD_BANNER_UP_AND_HORIZONTAL}" } spcd_banner_unset() {