From 229d6f062bd115aed6828f2bbadebd67956377bf Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 5 Feb 2021 22:18:13 +0000 Subject: [PATCH] Adds a script to welcome user after SSH login --- utils/welcome-banner.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 utils/welcome-banner.sh diff --git a/utils/welcome-banner.sh b/utils/welcome-banner.sh new file mode 100644 index 0000000..4212fc9 --- /dev/null +++ b/utils/welcome-banner.sh @@ -0,0 +1,25 @@ +# Script that shows a welcome message and prints system info for user +# Licensed under MIT, (C) Alicia Sykes 2021: https://aliciasykes.com + + +# Make nice welcome message, with a first-letter capitalized username +WELCOME_MSG="Welcome $(echo "$USER" | sed 's/.*/\u&/') !" + +# Print welcome message, using figlet & lolcat if availible +if hash lolcat 2>/dev/null && hash figlet 2>/dev/null; then + echo "${WELCOME_MSG}" | figlet | lolcat +else + echo "${WELCOME_MSG}" +fi + +# Print system information with neofetch, if it's installed +if hash neofetch 2>/dev/null; then + neofetch --shell_version off \ + --disable shell resolution de wm wm_theme theme icons terminal \ + --backend off \ + --colors 4 8 4 4 8 6 \ + --color_blocks off \ + --memory_display info +fi + +# EOF