spcd_banner_append

This commit is contained in:
Marc Beninca 2024-08-24 13:08:10 +02:00
parent e87d66c3a9
commit f1f5004e2a
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1075,12 +1075,12 @@ spcd_banner_add() {
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_add_123 \ spcd_banner_append \
"${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}" "${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}"
fi fi
} }
spcd_banner_add_123() { spcd_banner_append() {
if [ -n "${3}" ]; then if [ -n "${3}" ]; then
SPCD_BANNER_1="${SPCD_BANNER_1}${1}" SPCD_BANNER_1="${SPCD_BANNER_1}${1}"
SPCD_BANNER_2="${SPCD_BANNER_2}${2}" SPCD_BANNER_2="${SPCD_BANNER_2}${2}"
@ -1089,7 +1089,7 @@ spcd_banner_add_123() {
} }
spcd_banner_close() { spcd_banner_close() {
spcd_banner_add_123 "╮" "${SPCD_VERT}" "╯" spcd_banner_append "╮" "${SPCD_VERT}" "╯"
} }
spcd_banner_echo() { spcd_banner_echo() {
@ -1100,11 +1100,11 @@ ${SPCD_BANNER_3}"
} }
spcd_banner_open() { spcd_banner_open() {
spcd_banner_add_123 "${SPCD_BOX_DOWN}" "${SPCD_VERT}" "${SPCD_BOX_UP}" spcd_banner_append "${SPCD_BOX_DOWN}" "${SPCD_VERT}" "${SPCD_BOX_UP}"
} }
spcd_banner_split() { spcd_banner_split() {
spcd_banner_add_123 "┬" "${SPCD_VERT}" "┴" spcd_banner_append "┬" "${SPCD_VERT}" "┴"
} }
spcd_banner_unset() { spcd_banner_unset() {