mirror of
https://gitlab.com/jschx/ufetch.git
synced 2026-10-01 05:52:34 +07:00
Merge branch 'dawidpotocki/ufetch-master'
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
|
||||
# ufetch-centos - tiny system info for centos
|
||||
|
||||
## INFO
|
||||
|
||||
# user is already defined
|
||||
host="$(hostname)"
|
||||
os="$(cat /etc/centos-release | sed 's/release //')"
|
||||
kernel="$(uname -sr)"
|
||||
uptime="$(uptime -p | sed 's/up //')"
|
||||
packages="$(yum list installed | wc -l)"
|
||||
shell="$(basename ${SHELL})"
|
||||
|
||||
if [ -z "${WM}" ]; then
|
||||
if [ "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
envtype='DE:'
|
||||
WM="${XDG_CURRENT_DESKTOP}"
|
||||
elif [ "${DESKTOP_SESSION}" ]; then
|
||||
envtype='DE:'
|
||||
WM="${DESKTOP_SESSION}"
|
||||
elif [ -f "${HOME}/.xinitrc" ]; then
|
||||
envtype='WM:'
|
||||
WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)"
|
||||
fi
|
||||
else
|
||||
envtype='WM:'
|
||||
fi
|
||||
|
||||
## DEFINE COLORS
|
||||
|
||||
# probably don't change these
|
||||
if [ -x "$(command -v tput)" ]; then
|
||||
bold="$(tput bold)"
|
||||
black="$(tput setaf 0)"
|
||||
red="$(tput setaf 1)"
|
||||
green="$(tput setaf 2)"
|
||||
yellow="$(tput setaf 3)"
|
||||
blue="$(tput setaf 4)"
|
||||
magenta="$(tput setaf 5)"
|
||||
cyan="$(tput setaf 6)"
|
||||
white="$(tput setaf 7)"
|
||||
reset="$(tput sgr0)"
|
||||
fi
|
||||
|
||||
# you can change these
|
||||
lc="${reset}${bold}${magenta}" # labels
|
||||
nc="${reset}${bold}${magenta}" # user and hostname
|
||||
ic="${reset}${bold}${white}" # info
|
||||
c0="${reset}${bold}${green}" # first color
|
||||
c1="${reset}${bold}${yellow}" # second color
|
||||
c2="${reset}${bold}${magenta}" # third color
|
||||
c3="${reset}${bold}${blue}" # fourth color
|
||||
|
||||
## OUTPUT
|
||||
|
||||
cat <<EOF
|
||||
|
||||
${c0} ____${c1}^${c2}____ ${nc}${USER}${ic}@${nc}${host}${reset}
|
||||
${c0} |\\ ${c1}|${c2} /| ${lc}OS: ${ic}${os}${reset}
|
||||
${c0} | \\ ${c1}|${c2} / | ${lc}KERNEL: ${ic}${kernel}${reset}
|
||||
${c2} <---- ${c3}----> ${lc}UPTIME: ${ic}${uptime}${reset}
|
||||
${c3} | / ${c0}|${c1} \\ | ${lc}PACKAGES: ${ic}${packages}${reset}
|
||||
${c3} |/__${c0}|${c1}__\\| ${lc}SHELL: ${ic}${shell}${reset}
|
||||
${c0} v ${lc}${envtype} ${ic}${WM}${reset}
|
||||
|
||||
EOF
|
||||
Executable
+65
@@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ufetch-elementary - tiny system info for elementary os
|
||||
|
||||
## INFO
|
||||
|
||||
# user is already defined
|
||||
host="$(hostname)"
|
||||
os="$(lsb_release -ds)"
|
||||
kernel="$(uname -sr)"
|
||||
uptime="$(uptime -p | sed 's/up //')"
|
||||
packages="$(dpkg -l | wc -l)"
|
||||
shell="$(basename ${SHELL})"
|
||||
|
||||
if [ -z "${WM}" ]; then
|
||||
if [ "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
envtype='DE:'
|
||||
WM="${XDG_CURRENT_DESKTOP}"
|
||||
elif [ "${DESKTOP_SESSION}" ]; then
|
||||
envtype='DE:'
|
||||
WM="${DESKTOP_SESSION}"
|
||||
elif [ -f "${HOME}/.xinitrc" ]; then
|
||||
envtype='WM:'
|
||||
WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)"
|
||||
fi
|
||||
else
|
||||
envtype='WM:'
|
||||
fi
|
||||
|
||||
## DEFINE COLORS
|
||||
|
||||
# probably don't change these
|
||||
if [ -x "$(command -v tput)" ]; then
|
||||
bold="$(tput bold)"
|
||||
black="$(tput setaf 0)"
|
||||
red="$(tput setaf 1)"
|
||||
green="$(tput setaf 2)"
|
||||
yellow="$(tput setaf 3)"
|
||||
blue="$(tput setaf 4)"
|
||||
magenta="$(tput setaf 5)"
|
||||
cyan="$(tput setaf 6)"
|
||||
white="$(tput setaf 7)"
|
||||
reset="$(tput sgr0)"
|
||||
fi
|
||||
|
||||
# you can change these
|
||||
lc="${reset}${bold}${green}" # labels
|
||||
nc="${reset}${bold}${green}" # user and hostname
|
||||
ic="${reset}${bold}${white}" # info
|
||||
c0="${reset}${bold}${white}" # first color
|
||||
c1="${reset}${white}" # second color
|
||||
|
||||
## OUTPUT
|
||||
|
||||
cat <<EOF
|
||||
|
||||
${c1} _______ ${lc}${USER}${ic}@${lc}${host}${reset}
|
||||
${c1} / ${c0}____ ${c1}\\ ${lc}OS: ${ic}${os}${reset}
|
||||
${c1} / ${c0}| / /${c1}\\ ${lc}KERNEL: ${ic}${kernel}${reset}
|
||||
${c1} |${c0}__\\ / /${c1} | ${lc}UPTIME: ${ic}${uptime}${reset}
|
||||
${c1} \\ ${c0}/__/${c1} / ${lc}PACKAGES: ${ic}${packages}${reset}
|
||||
${c1} \\_______/ ${lc}SHELL: ${ic}${shell}${reset}
|
||||
${c1} ${lc}${envtype} ${ic}${WM}${reset}
|
||||
|
||||
EOF
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ufetch-mageia - tiny system info for mageia
|
||||
|
||||
## INFO
|
||||
|
||||
# user is already defined host="$(hostname)" os="$(lsb_release -ds)"
|
||||
os="$(lsb_release -ds | tr -d \")"
|
||||
kernel="$(uname -sr)"
|
||||
uptime="$(uptime -p | sed 's/up //')"
|
||||
packages="$(yum list installed | wc -l)"
|
||||
shell="$(basename ${SHELL})"
|
||||
|
||||
if [ -z "${WM}" ]; then
|
||||
if [ "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
envtype='DE:'
|
||||
WM="${XDG_CURRENT_DESKTOP}"
|
||||
elif [ "${DESKTOP_SESSION}" ]; then
|
||||
envtype='DE:'
|
||||
WM="${DESKTOP_SESSION}"
|
||||
elif [ -f "${HOME}/.xinitrc" ]; then
|
||||
envtype='WM:'
|
||||
WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)"
|
||||
fi
|
||||
else
|
||||
envtype='WM:'
|
||||
fi
|
||||
|
||||
## DEFINE COLORS
|
||||
|
||||
# probably don't change these
|
||||
if [ -x "$(command -v tput)" ]; then
|
||||
bold="$(tput bold)"
|
||||
black="$(tput setaf 0)"
|
||||
red="$(tput setaf 1)"
|
||||
green="$(tput setaf 2)"
|
||||
yellow="$(tput setaf 3)"
|
||||
blue="$(tput setaf 4)"
|
||||
magenta="$(tput setaf 5)"
|
||||
cyan="$(tput setaf 6)"
|
||||
white="$(tput setaf 7)"
|
||||
reset="$(tput sgr0)"
|
||||
fi
|
||||
|
||||
# you can change these
|
||||
lc="${reset}${bold}${blue}" # labels
|
||||
nc="${reset}${bold}${blue}" # user and hostname
|
||||
ic="${reset}${bold}${white}" # info
|
||||
c0="${reset}${bold}${white}" # first color
|
||||
c1="${reset}${bold}${cyan}" # second color
|
||||
|
||||
## OUTPUT
|
||||
|
||||
cat <<EOF
|
||||
|
||||
${c1} * ${nc}${USER}${ic}@${nc}${host}${reset}
|
||||
${c1} * ${lc}OS: ${ic}${os}${reset}
|
||||
${c1} ** ${lc}KERNEL: ${ic}${kernel}${reset}
|
||||
${c0} /\\__/\\ ${lc}UPTIME: ${ic}${uptime}${reset}
|
||||
${c0} / \\ ${lc}PACKAGES: ${ic}${packages}${reset}
|
||||
${c0} \\ / ${lc}SHELL: ${ic}${shell}${reset}
|
||||
${c0} \\____/ ${lc}${envtype} ${ic}${WM}${reset}
|
||||
|
||||
EOF
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ufetch-mxlinux - tiny system info for mxlinux
|
||||
|
||||
## INFO
|
||||
|
||||
# user is already defined
|
||||
host="$(hostname)"
|
||||
os="$(lsb_release -ds)"
|
||||
kernel="$(uname -sr)"
|
||||
uptime="$(uptime -p | sed 's/up //')"
|
||||
packages="$(dpkg -l | wc -l)"
|
||||
shell="$(basename ${SHELL})"
|
||||
|
||||
if [ -z "${WM}" ]; then
|
||||
if [ "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
envtype='DE:'
|
||||
WM="${XDG_CURRENT_DESKTOP}"
|
||||
elif [ "${DESKTOP_SESSION}" ]; then
|
||||
envtype='DE:'
|
||||
WM="${DESKTOP_SESSION}"
|
||||
elif [ -f "${HOME}/.xinitrc" ]; then
|
||||
envtype='WM:'
|
||||
WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)"
|
||||
fi
|
||||
else
|
||||
envtype='WM:'
|
||||
fi
|
||||
|
||||
## DEFINE COLORS
|
||||
|
||||
# probably don't change these
|
||||
if [ -x "$(command -v tput)" ]; then
|
||||
bold="$(tput bold)"
|
||||
black="$(tput setaf 0)"
|
||||
red="$(tput setaf 1)"
|
||||
green="$(tput setaf 2)"
|
||||
yellow="$(tput setaf 3)"
|
||||
blue="$(tput setaf 4)"
|
||||
magenta="$(tput setaf 5)"
|
||||
cyan="$(tput setaf 6)"
|
||||
white="$(tput setaf 7)"
|
||||
reset="$(tput sgr0)"
|
||||
fi
|
||||
|
||||
# you can change these
|
||||
lc="${reset}${bold}${white}" # labels
|
||||
nc="${reset}${bold}${white}" # user and hostname
|
||||
ic="${reset}${bold}${white}" # info
|
||||
c0="${reset}${bold}${white}" # first color
|
||||
|
||||
## OUTPUT
|
||||
|
||||
cat <<EOF
|
||||
|
||||
${c0} \\\\ / ${lc}${USER}${ic}@${lc}${host}${reset}
|
||||
${c0} \\\\/ ${lc}OS: ${ic}${os}${reset}
|
||||
${c0} \\\\ ${lc}KERNEL: ${ic}${kernel}${reset}
|
||||
${c0} /\\/ \\\\ ${lc}UPTIME: ${ic}${uptime}${reset}
|
||||
${c0} / \\ /\\ ${lc}PACKAGES: ${ic}${packages}${reset}
|
||||
${c0} / \\/ \\ ${lc}SHELL: ${ic}${shell}${reset}
|
||||
${c0} /__________\\ ${lc}${envtype} ${ic}${WM}${reset}
|
||||
|
||||
EOF
|
||||
Reference in New Issue
Block a user