Last active
December 3, 2019 23:26
-
-
Save mattiasghodsian/a953a67b0f897079764ee4e75a1778cb to your computer and use it in GitHub Desktop.
Terminal Welcome message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# vars | |
os=$(lsb_release -sd) | |
codename=$(lsb_release -sc) | |
id=$(lsb_release -si) | |
pubip=$(dig @resolver1.opendns.com A myip.opendns.com +short -4) | |
locip=$(hostname -I | cut -d " " -f1) | |
ut=$(awk '{print int($1/86400)"days "int($1%86400/3600)":"int(($1%3600)/60)":"int($1%60)}' /proc/uptime) | |
qt=$(fortune -n 25 -s) | |
shl=$SHELL | |
# font | |
BOLD=$(tput bold) | |
NORM=$(tput sgr0) | |
# script | |
clear | |
toilet -f "Red Phoenix" " $USER" --gay | |
printf " ${BOLD}$qt${NORM}\n\n" | |
printf " Os: ${BOLD} $os {$codename} ${NORM} \n" | |
printf " IP: ${BOLD} $pubip ${NORM} \n" | |
printf " Local: ${BOLD} $locip ${NORM} \n" | |
printf " Uptime: ${BOLD} $ut ${NORM} \n" | |
printf " Shell: ${BOLD} ${shl##*/} ${NORM} \n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment