From 49d81e7d6465f310eefd2f0b71a2931edda9e183 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Fri, 28 Oct 2022 19:42:47 +0000 Subject: [PATCH] Update dotfiles/.local/motd.sh --- dotfiles/.local/motd.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dotfiles/.local/motd.sh b/dotfiles/.local/motd.sh index e1083ca5..4c2c8e7e 100644 --- a/dotfiles/.local/motd.sh +++ b/dotfiles/.local/motd.sh @@ -203,10 +203,12 @@ generate_bar_disk() { } print_banner() { - if [ -e lolcat ]; then + if command -v lolcat > /dev/null && command -v figlet > /dev/null; then /usr/bin/env figlet "$(hostname)" | /usr/bin/env lolcat -f - else + elif command -v figlet > /dev/null; then printf "\\n%s\\n" "$(figlet -t -f "$BANNER_FONTPATH" " $BANNER_TEXT")" + else + printf " \\033[1;37m$(hostname)\\033[0m\\n" fi if [ -f /etc/os-release ]; then