Skip to content

Instantly share code, notes, and snippets.

@stav121
Created January 3, 2019 00:58
Show Gist options
  • Save stav121/a8111ce23d46e8b22d9e5656216ca85e to your computer and use it in GitHub Desktop.
Save stav121/a8111ce23d46e8b22d9e5656216ca85e to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# This script is an edit of ufetch
#
## INFO
hostname="$(hostname)"
os="$(lsb_release -a | grep Description | awk '{print $2""" """$3}')"
kernel="$(uname -sr)"
uptime="$(uptime -p | sed 's/up //')"
packages="$(pacman -Q | wc -l)"
shell="$(basename ${SHELL})"
if [ -z "${WM}" ]; then
WM="$(echo $GDMSESSION)"
fi
## DEFINE COLORS
# Don't change
bc="$(tput bold)" # bold
c0="$(tput setaf 0)" # black
c1="$(tput setaf 1)" # red
c2="$(tput setaf 2)" # green
c3="$(tput setaf 3)" # yellow
c4="$(tput setaf 4)" # blue
c5="$(tput setaf 5)" # magenta
c6="$(tput setaf 6)" # cyan
c7="$(tput setaf 7)" # white
rc="$(tput sgr0)" # reset
# You can change these
nc="${rc}${bc}${c1}" # user and hostname
ic="${rc}" # info
fc="${rc}${c4}${bc}" # first color
sc="${rc}${bc}${c7}" # second color
## OUTPUT
cat <<EOF
${fc} .-'
${fc} '--./ / _.---.
${fc} '-, (__..-' \
${fc} \ ${sc}.${fc} |
${fc} ',.__. ,__.--/
${sc} '._${sc}/_.'${sc}___.-'
${nc} ${USER}${ic}@${nc}${hostname}
${fc} OS:${fc} ${ic}${os}
${fc} Kernel: ${fc} ${ic}${kernel}
${fc} Pkgs: ${fc} ${ic}${packages}
${fc} WM: ${fc} ${ic}${WM}
${fc} SHELL: ${fc} ${ic}${shell}
${rc}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment