From 4dc779e54f1144d995a83624ac67eb9a7ea9cc4c Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Sat, 29 Oct 2022 04:47:28 +0000 Subject: [PATCH] Update dotfiles/.local/motd.sh --- dotfiles/.local/motd.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/dotfiles/.local/motd.sh b/dotfiles/.local/motd.sh index 81806635..efd63933 100644 --- a/dotfiles/.local/motd.sh +++ b/dotfiles/.local/motd.sh @@ -227,10 +227,24 @@ print_banner() { banner_distro_name="Fedora" banner_distro_version=$VERSION_ID else - banner_distro_icon="?" + banner_distro_icon="$OS_ICON" banner_distro_color="0" - banner_distro_name="Unknown" - banner_distro_version="?" + if [ -n "$NAME" ]; then + banner_distro_name="$NAME" + elif [ -n "$PRETTY_NAME" ]; then + banner_distro_name="$PRETTY_NAME" + else + banner_distro_name="Linux" + fi + if [ -n "$VERSION" ]; then + banner_distro_version="$VERSION" + elif [ -n "$VERSION_ID" ]; then + banner_distro_version="$VERSION_ID" + elif [ -n "$BUILD_ID" ]; then + banner_distro_version="$BUILD_ID" + else + banner_distro_version="Version Unknown" + fi fi banner_distro_space=$(generate_space "$banner_distro_name" 13)