mirror of
https://gitlab.com/jschx/ufetch.git
synced 2026-11-06 15:50:53 +00:00
Merge branch 'master' into 'master'
Add SUSE, Parabola and Antergos See merge request jschx/ufetch!37
This commit is contained in:
commit
cdeaad466a
3 files changed
+194
No files matched your search
Executable
+65
@@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# ufetch-antergos - tiny system info for antergos
|
||||||
|
|
||||||
|
## INFO
|
||||||
|
|
||||||
|
# user is already defined
|
||||||
|
host="$(hostname)"
|
||||||
|
os='Antergos'
|
||||||
|
kernel="$(uname -sr)"
|
||||||
|
uptime="$(uptime -p | sed 's/up //')"
|
||||||
|
packages="$(pacman -Q | 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}${blue}" # first color
|
||||||
|
c1="${reset}${bold}${white}" # second color
|
||||||
|
|
||||||
|
## OUTPUT
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
${c0} .\`\`\`. ${nc}${USER}${ic}@${nc}${host}${reset}
|
||||||
|
${c0} / \\ ${lc}OS: ${ic}${os}${reset}
|
||||||
|
${c0} / ${c1}.\` ${c0}\\ ${lc}KERNEL: ${ic}${kernel}${reset}
|
||||||
|
${c0} / ${c1}.\` .\` . ${c0}\\ ${lc}UPTIME: ${ic}${uptime}${reset}
|
||||||
|
${c0} / ${c1}\` .\`.\` .\` ${c0}\\ ${lc}PACKAGES: ${ic}${packages}${reset}
|
||||||
|
${c0} | ${c1}\`.\` \` ${c0}| ${lc}SHELL: ${ic}${shell}${reset}
|
||||||
|
${c0} \\___________/ ${lc}${envtype} ${ic}${WM}${reset}
|
||||||
|
|
||||||
|
EOF
|
||||||
Executable
+65
@@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# ufetch-parabola - tiny system info for parabola
|
||||||
|
|
||||||
|
## INFO
|
||||||
|
|
||||||
|
# user is already defined
|
||||||
|
host="$(hostname)"
|
||||||
|
os='Parabola GNU/Linux'
|
||||||
|
kernel="$(uname -sr)"
|
||||||
|
uptime="$(uptime -p | sed 's/up //')"
|
||||||
|
packages="$(pacman -Q | 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}${magenta}" # first color
|
||||||
|
c1="${reset}${magenta}" # second color
|
||||||
|
|
||||||
|
## OUTPUT
|
||||||
|
|
||||||
|
cat<<EOF
|
||||||
|
|
||||||
|
${c0} __ __ __ _ ${nc}${USER}${ic}@${nc}${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
|
||||||
Executable
+64
@@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# ufetch-suse - tiny system info for suse
|
||||||
|
|
||||||
|
## INFO
|
||||||
|
|
||||||
|
# user is already defined
|
||||||
|
host="$(hostname)"
|
||||||
|
os="$(lsb_release -ds)"
|
||||||
|
kernel="$(uname -sr)"
|
||||||
|
uptime="$(uptime -p | sed 's/up //')"
|
||||||
|
packages="$(rpm -qa --last | 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}${green}" # first color
|
||||||
|
|
||||||
|
## OUTPUT
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
${c0} _______ ${nc}${USER}${ic}@${nc}${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