mirror of
https://gitlab.com/jschx/ufetch.git
synced 2026-10-28 12:31:02 +00:00
Add NixOS logo.
This commit is contained in:
1 parent
7ab677d940
commit
5c2f4930b7
1 file changed
+23
-22
+23
-22
@@ -6,20 +6,20 @@
|
|||||||
## INFO
|
## INFO
|
||||||
|
|
||||||
# user is already defined
|
# user is already defined
|
||||||
HOST="$(hostname)"
|
host="$(hostname)"
|
||||||
OS="$(nixos-version)"
|
os="$(nixos-version)"
|
||||||
KERNEL="$(uname -sr)"
|
kernel="$(uname -sr)"
|
||||||
UPTIME="$(uptime -p | sed s:"up "::)"
|
uptime="$(uptime -p | sed 's/up //')"
|
||||||
PACKAGES="$(ls -d -1 /nix/store/* | wc -l)"
|
packages="$(ls -d -1 /nix/store/* | wc -l)"
|
||||||
# shell is already defined
|
shell="$(basename ${SHELL})"
|
||||||
if [ -z "$WM" ]; then
|
if [ -z "${WM}" ]; then
|
||||||
WM="$(grep -v "^#" "${HOME}/.xinitrc" | tail -n 1 | cut -d " " -f2)"
|
WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bc="$(tput bold)" # bold
|
bc="$(tput bold)" # bold
|
||||||
c0="$(tput setaf 0)" # black
|
c0="$(tput setaf 0)" # black
|
||||||
c1="$(tput setaf 1)" # red
|
c1="$(tput setaf 1)" # red
|
||||||
c2="$(tput setaf 2)" # green
|
c2="$(tput setaf 2)" # green
|
||||||
@@ -28,24 +28,25 @@ c4="$(tput setaf 4)" # blue
|
|||||||
c5="$(tput setaf 5)" # magenta
|
c5="$(tput setaf 5)" # magenta
|
||||||
c6="$(tput setaf 6)" # cyan
|
c6="$(tput setaf 6)" # cyan
|
||||||
c7="$(tput setaf 7)" # white
|
c7="$(tput setaf 7)" # white
|
||||||
rc="$(tput sgr0)" # reset
|
rc="$(tput sgr0)" # reset
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${bc}${c6}" # labels
|
lc="${rc}${bc}${c4}" # labels
|
||||||
nc="${bc}${c6}" # user and hostname
|
nc="${rc}${bc}${c4}" # user and hostname
|
||||||
tc="${bc}${c7}" # text
|
ic="${rc}${bc}${c7}" # info
|
||||||
pc="${c6}" # penguin
|
fc="${rc}${c4}" # first color
|
||||||
|
sc="${rc}${bc}${c4}" # second color
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|
||||||
cat <<EOF
|
sed 's/\\/\\\\/g' <<EOF
|
||||||
|
|
||||||
${pc} ___${rc} ${nc}${USER}${rc}${tc}@${rc}${nc}${HOST}${rc}
|
${fc} \\ ${sc}\\ // ${nc}${USER}${ic}@${rc}${nc}${host}${rc}
|
||||||
${pc} (${rc}${c7}.·${rc} ${pc}|${rc} ${lc}OS:${rc} ${tc}${OS}${rc}
|
${fc} ==\\__${sc}\\/ ${fc}// ${lc}OS: ${ic}${os}${rc}
|
||||||
${pc} (${rc}${c3}<>${rc} ${pc}|${rc} ${lc}KERNEL:${rc} ${tc}${KERNEL}${rc}
|
${sc} // \\${fc}// ${lc}KERNEL: ${ic}${kernel}${rc}
|
||||||
${pc} /${rc} ${c7}__${rc} ${pc}\\${rc} ${lc}UPTIME:${rc} ${tc}${UPTIME}${rc}
|
${sc} ==// ${fc}//== ${lc}UPTIME: ${ic}${uptime}${rc}
|
||||||
${pc} (${rc} ${c7}/ \\${rc} ${pc}/|${rc} ${lc}PACKAGES:${rc} ${tc}${PACKAGES}${rc}
|
${sc} //${fc}\\${sc}___${fc}// ${lc}PACKAGES: ${ic}${packages}${rc}
|
||||||
${c3} _${pc}/\\${rc} ${c7}__)${rc}${pc}/${rc}${c3}_${rc}${pc})${rc} ${lc}SHELL:${rc} ${tc}${SHELL}${rc}
|
${sc} // ${fc}/\\ ${sc}\\== ${lc}SHELL: ${ic}${shell}${rc}
|
||||||
${c3} \/${pc}-____${rc}${c3}\/${rc} ${lc}WM:${rc} ${tc}${WM}${rc}
|
${fc} // \\ ${sc}\\ ${lc}WM: ${ic}${WM}${rc}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
Reference in new issue
Block a user