misc: cleanup
This commit is contained in:
parent
c461704b36
commit
23d02ae90e
1 changed files with 36 additions and 28 deletions
24
neofetch
24
neofetch
|
@ -1430,11 +1430,15 @@ get_de() {
|
|||
# Format strings.
|
||||
case "$de" in
|
||||
"KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;;
|
||||
*"MUFFIN"* | "Cinnamon") de="$(cinnamon --version)"; de="${de:-Cinnamon}" ;;
|
||||
*"xfce4"*) de="Xfce4" ;;
|
||||
*"xfce5"*) de="Xfce5" ;;
|
||||
*"xfce"*) de="Xfce" ;;
|
||||
*"mate"*) de="MATE" ;;
|
||||
|
||||
*"MUFFIN"* | "Cinnamon")
|
||||
de="$(cinnamon --version)"; de="${de:-Cinnamon}"
|
||||
;;
|
||||
|
||||
*"GNOME"*)
|
||||
de="$(gnome-shell --version)"
|
||||
de="${de/Shell }"
|
||||
|
@ -1524,15 +1528,14 @@ get_wm() {
|
|||
;;
|
||||
|
||||
"FreeMiNT")
|
||||
wm="Atari AES"
|
||||
for files in /proc/*; do
|
||||
case "$files" in
|
||||
freemint_wm=(/proc/*)
|
||||
case "${freemint_wm[*]}" in
|
||||
*xaaes*) wm="XaAES" ;;
|
||||
*myaes*) wm="MyAES" ;;
|
||||
*naes*) wm="N.AES" ;;
|
||||
geneva) wm="Geneva" ;;
|
||||
*) wm="Atari AES" ;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -1876,7 +1879,9 @@ get_cpu() {
|
|||
cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')"
|
||||
;;
|
||||
|
||||
"physical") cores="$(lparstat -i | awk -F':' '/Active Physical CPUs/ {printf $2}')"
|
||||
"physical")
|
||||
cores="$(lparstat -i | awk -F':' '/Active Physical CPUs/ {printf $2}')"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
|
@ -1979,9 +1984,12 @@ get_cpu_usage() {
|
|||
"Solaris") cores="$(kstat -m cpu_info | grep -c -F "chip_id")" ;;
|
||||
"Haiku") cores="$(sysinfo -cpu | grep -c -F 'CPU #')" ;;
|
||||
"iPhone OS") cores="${cpu/*\(}"; cores="${cores/\)*}" ;;
|
||||
"AIX") cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')" ;;
|
||||
"IRIX") cores="$(sysconf NPROC_ONLN)" ;;
|
||||
"FreeMiNT") cores="$(sysctl -n hw.ncpu)"
|
||||
"FreeMiNT") cores="$(sysctl -n hw.ncpu)" ;;
|
||||
|
||||
"AIX")
|
||||
cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue