stow_dotfiles/scripts/.local/bin/banner

21 lines
352 B
Bash
Executable file

#!/usr/bin/env bash
clear=$'\033[2J'
curoff=$'\033[?25h'
curon=$'\033[?25h'
top=$'\033[H'
trap 'echo "${curon}"; echo "${clear}"; exit; trap -- - SIGINT SIGTERM' SIGTERM SIGINT
what="$*"
if [ -z "${what}" ]; then
read -rp "Text: " what
fi
echo "${clear}"
while true; do
echo "${top}"
figl <<<"$what" | lolcat
echo "${curoff}"
sleep 2
done