From d7f9d6998d5b824dbfc0838b1201ba571d016508 Mon Sep 17 00:00:00 2001 From: jschx Date: Sat, 6 May 2017 00:38:23 -0500 Subject: [PATCH] Consistency fixes. --- README.md | 2 +- ufetch-alpine | 46 +++++++++++++++++----------------- ufetch-arch | 46 +++++++++++++++++----------------- ufetch-crux | 42 +++++++++++++++---------------- ufetch-gentoo | 67 +++++++++++++++++++++++++------------------------- ufetch-openbsd | 63 ++++++++++++++++++++++++----------------------- ufetch-void | 46 +++++++++++++++++----------------- 7 files changed, 157 insertions(+), 155 deletions(-) diff --git a/README.md b/README.md index 652ece4..881af79 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # ufetch -Tiny system info for Linux distributions and \*BSDs. \ No newline at end of file +Tiny system info for Linux distributions and \*BSDs. diff --git a/ufetch-alpine b/ufetch-alpine index b364a80..140a575 100755 --- a/ufetch-alpine +++ b/ufetch-alpine @@ -1,25 +1,25 @@ #!/bin/sh # -# ufetch-void - tiny system info for void +# ufetch-alpine - tiny system info for alpine linux # ## INFO # user is already defined -HOST="$(hostname)" -OS="Alpine Linux" -KERNEL="$(uname -sr)" -UPTIME="$(uptime -p | sed s:"up "::)" -PACKAGES="$(apk info | wc -l)" -# shell is already defined -if [ -z "$WM" ]; then - WM="$(grep -v "^#" "${HOME}/.xinitrc" | tail -n 1 | cut -d " " -f2)" +hostname="$(hostname)" +os='Alpine Linux' +kernel="$(uname -sr)" +uptime="$(uptime -p | sed 's/up //')" +packages="$(apk info | wc -l)" +shell="$(basename ${SHELL})" +if [ -z "${WM}" ]; then + WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" fi ## DEFINE COLORS # probably don't change these -bc="$(tput bold)" # bold +bc="$(tput bold)" # bold c0="$(tput setaf 0)" # black c1="$(tput setaf 1)" # red c2="$(tput setaf 2)" # green @@ -28,25 +28,25 @@ c4="$(tput setaf 4)" # blue c5="$(tput setaf 5)" # magenta c6="$(tput setaf 6)" # cyan c7="$(tput setaf 7)" # white -rc="$(tput sgr0)" # reset +rc="$(tput sgr0)" # reset # you can change these -lc="${bc}${c4}" # labels -nc="${bc}${c4}" # user and hostname -tc="${bc}${c7}" # text -fc="${bc}${c2}" # first color -sc="${c2}" # second color +lc="${rc}${bc}${c4}" # labels +nc="${rc}${bc}${c4}" # user and hostname +ic="${rc}${bc}${c7}" # info +fc="${rc}${c4}" # first color +sc="${rc}${c7}" # second color ## OUTPUT cat <${rc} ${pc}|${rc} ${lc}KERNEL:${rc} ${tc}${KERNEL}${rc} -${pc} /${rc} ${c7}__${rc} ${pc}\\${rc} ${lc}UPTIME:${rc} ${tc}${UPTIME}${rc} -${pc} (${rc} ${c7}/ \\${rc} ${pc}/|${rc} ${lc}PACKAGES:${rc} ${tc}${PACKAGES}${rc} -${c3} _${pc}/\\${rc} ${c7}__)${rc}${pc}/${rc}${c3}_${rc}${pc})${rc} ${lc}SHELL:${rc} ${tc}${SHELL}${rc} -${c3} \/${pc}-____${rc}${c3}\/${rc} ${lc}WM:${rc} ${tc}${WM}${rc} +${pc} ___ ${nc}${USER}${ic}@${nc}${hostname}${rc} +${pc} (${c7}.· ${pc}| ${lc}OS: ${ic}${os}${rc} +${pc} (${c3}<> ${pc}| ${lc}KERNEL: ${ic}${kernel}${rc} +${pc} / ${c7}__ ${pc}\\ ${lc}UPTIME: ${ic}${uptime}${rc} +${pc} ( ${c7}/ \\ ${pc}/| ${lc}PACKAGES: ${ic}${packages}${rc} +${c3} _${pc}/\\ ${c7}__)${pc}/${c3}_${pc}) ${lc}SHELL: ${ic}${shell}${rc} +${c3} \/${pc}-____${c3}\/ ${lc}WM: ${ic}${WM}${rc} EOF diff --git a/ufetch-gentoo b/ufetch-gentoo index 077a95f..c76fc14 100755 --- a/ufetch-gentoo +++ b/ufetch-gentoo @@ -1,54 +1,55 @@ #!/bin/sh # -# ufetch-gentoo - tiny system info for gentoo +# ufetch-gentoo - tiny system info for gentoo linux # ## INFO # user is already defined -HOST="$(hostname)" -OS='Gentoo Linux' -KERNEL="$(uname -sr)" -UPTIME="$(uptime -p | sed s:'up ':'':)" -PACKAGES="$(ls -d /var/db/pkg/*/* | wc -l)" -# shell is already defined -if [ -z "$WM" ]; then - WM=$(tail -n 1 "$HOME/.xinitrc" | cut -d ' ' -f3) +host="$(hostname)" +os='Gentoo Linux' +kernel="$(uname -sr)" +uptime="$(uptime -p | sed 's/up //')" +packages="$(ls -d /var/db/pkg/*/* | wc -l)" +shell="$(basename ${SHELL})" +if [ -z "${WM}" ]; then + WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" fi -CPU="$(uname -p)" +cpu="$(uname -p)" ## DEFINE COLORS -rc=$(tput sgr0) # reset -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 -bc=$(tput bold) # bold +# probably don't change these +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 -lc=${c5} # labels -nc=${c5} # user and hostname -tc=${rc} # text -pc=${bc}${c5} # primary color -sc=${c5} # secondary color +lc="${rc}${bc}${c5}" # labels +nc="${rc}${bc}${c5}" # user and hostname +ic="${rc}${bc}${c7}" # info +fc="${rc}${bc}${c5}" # first color +sc="${rc}${c5}" # second color ## OUTPUT # art from gentoo prefix project's bootstrap-prefix.sh cat <