This commit is contained in:
Marc Beninca 2024-08-26 16:06:14 +02:00
parent 008312a322
commit c823709b4f
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -53,21 +53,21 @@ _spcd_fill() {
# │ internals │ banner │
# ╰───────────┴────────╯
SPCD_BANNER_DOWN_AND_HORIZONTAL="┬"
SPCD_BANNER_DOWN_AND_LEFT="╮"
SPCD_BANNER_DOWN_AND_RIGHT="╭"
SPCD_BANNER_HORIZONTAL="─"
SPCD_BANNER_UP_AND_HORIZONTAL="┴"
SPCD_BANNER_UP_AND_LEFT="╯"
SPCD_BANNER_UP_AND_RIGHT="╰"
SPCD_BANNER_VERTICAL="│"
_SPCD_BANNER_DOWN_AND_HORIZONTAL="┬"
_SPCD_BANNER_DOWN_AND_LEFT="╮"
_SPCD_BANNER_DOWN_AND_RIGHT="╭"
_SPCD_BANNER_HORIZONTAL="─"
_SPCD_BANNER_UP_AND_HORIZONTAL="┴"
_SPCD_BANNER_UP_AND_LEFT="╯"
_SPCD_BANNER_UP_AND_RIGHT="╰"
_SPCD_BANNER_VERTICAL="│"
_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_BANNER_HORIZONTAL}"
_spcd_fill "${spcd_ba__length}" "${_SPCD_BANNER_HORIZONTAL}"
)"
if [ -n "${SPCD_BANNER_MIDDLE}" ]; then
_spcd_banner_split
@ -112,9 +112,9 @@ ${SPCD_BANNER_BOTTOM}"
_spcd_banner_open() {
_spcd_banner_append \
"${SPCD_BANNER_DOWN_AND_RIGHT}" \
"${SPCD_BANNER_VERTICAL}" \
"${SPCD_BANNER_UP_AND_RIGHT}"
"${_SPCD_BANNER_DOWN_AND_RIGHT}" \
"${_SPCD_BANNER_VERTICAL}" \
"${_SPCD_BANNER_UP_AND_RIGHT}"
}
_spcd_banner_render() {
@ -137,16 +137,16 @@ _spcd_banner_render() {
_spcd_banner_shut() {
_spcd_banner_append \
"${SPCD_BANNER_DOWN_AND_LEFT}" \
"${SPCD_BANNER_VERTICAL}" \
"${SPCD_BANNER_UP_AND_LEFT}"
"${_SPCD_BANNER_DOWN_AND_LEFT}" \
"${_SPCD_BANNER_VERTICAL}" \
"${_SPCD_BANNER_UP_AND_LEFT}"
}
_spcd_banner_split() {
_spcd_banner_append \
"${SPCD_BANNER_DOWN_AND_HORIZONTAL}" \
"${SPCD_BANNER_VERTICAL}" \
"${SPCD_BANNER_UP_AND_HORIZONTAL}"
"${_SPCD_BANNER_DOWN_AND_HORIZONTAL}" \
"${_SPCD_BANNER_VERTICAL}" \
"${_SPCD_BANNER_UP_AND_HORIZONTAL}"
}
_spcd_banner_wipe() {