_/banner
This commit is contained in:
parent
008312a322
commit
c823709b4f
1 changed files with 18 additions and 18 deletions
|
@ -53,21 +53,21 @@ _spcd_fill() {
|
||||||
# │ internals │ banner │
|
# │ internals │ banner │
|
||||||
# ╰───────────┴────────╯
|
# ╰───────────┴────────╯
|
||||||
|
|
||||||
SPCD_BANNER_DOWN_AND_HORIZONTAL="┬"
|
_SPCD_BANNER_DOWN_AND_HORIZONTAL="┬"
|
||||||
SPCD_BANNER_DOWN_AND_LEFT="╮"
|
_SPCD_BANNER_DOWN_AND_LEFT="╮"
|
||||||
SPCD_BANNER_DOWN_AND_RIGHT="╭"
|
_SPCD_BANNER_DOWN_AND_RIGHT="╭"
|
||||||
SPCD_BANNER_HORIZONTAL="─"
|
_SPCD_BANNER_HORIZONTAL="─"
|
||||||
SPCD_BANNER_UP_AND_HORIZONTAL="┴"
|
_SPCD_BANNER_UP_AND_HORIZONTAL="┴"
|
||||||
SPCD_BANNER_UP_AND_LEFT="╯"
|
_SPCD_BANNER_UP_AND_LEFT="╯"
|
||||||
SPCD_BANNER_UP_AND_RIGHT="╰"
|
_SPCD_BANNER_UP_AND_RIGHT="╰"
|
||||||
SPCD_BANNER_VERTICAL="│"
|
_SPCD_BANNER_VERTICAL="│"
|
||||||
|
|
||||||
_spcd_banner_add() {
|
_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_ba__filler="$(
|
||||||
_spcd_fill "${spcd_ba__length}" "${SPCD_BANNER_HORIZONTAL}"
|
_spcd_fill "${spcd_ba__length}" "${_SPCD_BANNER_HORIZONTAL}"
|
||||||
)"
|
)"
|
||||||
if [ -n "${SPCD_BANNER_MIDDLE}" ]; then
|
if [ -n "${SPCD_BANNER_MIDDLE}" ]; then
|
||||||
_spcd_banner_split
|
_spcd_banner_split
|
||||||
|
@ -112,9 +112,9 @@ ${SPCD_BANNER_BOTTOM}"
|
||||||
|
|
||||||
_spcd_banner_open() {
|
_spcd_banner_open() {
|
||||||
_spcd_banner_append \
|
_spcd_banner_append \
|
||||||
"${SPCD_BANNER_DOWN_AND_RIGHT}" \
|
"${_SPCD_BANNER_DOWN_AND_RIGHT}" \
|
||||||
"${SPCD_BANNER_VERTICAL}" \
|
"${_SPCD_BANNER_VERTICAL}" \
|
||||||
"${SPCD_BANNER_UP_AND_RIGHT}"
|
"${_SPCD_BANNER_UP_AND_RIGHT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_spcd_banner_render() {
|
_spcd_banner_render() {
|
||||||
|
@ -137,16 +137,16 @@ _spcd_banner_render() {
|
||||||
|
|
||||||
_spcd_banner_shut() {
|
_spcd_banner_shut() {
|
||||||
_spcd_banner_append \
|
_spcd_banner_append \
|
||||||
"${SPCD_BANNER_DOWN_AND_LEFT}" \
|
"${_SPCD_BANNER_DOWN_AND_LEFT}" \
|
||||||
"${SPCD_BANNER_VERTICAL}" \
|
"${_SPCD_BANNER_VERTICAL}" \
|
||||||
"${SPCD_BANNER_UP_AND_LEFT}"
|
"${_SPCD_BANNER_UP_AND_LEFT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_spcd_banner_split() {
|
_spcd_banner_split() {
|
||||||
_spcd_banner_append \
|
_spcd_banner_append \
|
||||||
"${SPCD_BANNER_DOWN_AND_HORIZONTAL}" \
|
"${_SPCD_BANNER_DOWN_AND_HORIZONTAL}" \
|
||||||
"${SPCD_BANNER_VERTICAL}" \
|
"${_SPCD_BANNER_VERTICAL}" \
|
||||||
"${SPCD_BANNER_UP_AND_HORIZONTAL}"
|
"${_SPCD_BANNER_UP_AND_HORIZONTAL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_spcd_banner_wipe() {
|
_spcd_banner_wipe() {
|
||||||
|
|
Loading…
Reference in a new issue