banner/chars

This commit is contained in:
Marc Beninca 2024-08-25 12:03:48 +02:00
parent 63ab82e03e
commit c998143933
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1097,6 +1097,11 @@ spcd_fill() {
# │ internal │ banner │ # │ internal │ banner │
# ╰──────────┴────────╯ # ╰──────────┴────────╯
SPCD_BANNER=1
SPCD_BANNER_HORIZONTAL="─"
SPCD_BANNER_DOWN_AND_HORIZONTAL="┬"
SPCD_BANNER_UP_AND_HORIZONTAL="┴"
spcd_banner() { spcd_banner() {
spcd_banner_unset spcd_banner_unset
spcd_banner_open spcd_banner_open
@ -1126,7 +1131,9 @@ spcd_banner_add() {
if [ -n "${1}" ]; then if [ -n "${1}" ]; then
spcd_ba__text=" ${1} " spcd_ba__text=" ${1} "
spcd_ba__length=${#spcd_ba__text} 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_banner_append \
"${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}" "${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}"
fi fi
@ -1156,7 +1163,10 @@ spcd_banner_open() {
} }
spcd_banner_split() { 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() { spcd_banner_unset() {