diff --git a/neofetch b/neofetch index 214fb195..0249656a 100755 --- a/neofetch +++ b/neofetch @@ -368,9 +368,10 @@ getpackages() { type -p pisi >/dev/null 2>&1 && \ packages="$((packages+=$(pisi list-installed | wc -l)))" - type -p pkg >/dev/null 2>&1 && \ + if type -p pkg >/dev/null 2>&1; then packages="$((packages+=$(ls -1 /var/db/pkg | wc -l)))" [ "$packages" == "0" ] && packages="$((packages+=$(pkg list | wc -l)))" + fi type -p emerge >/dev/null 2>&1 && \ packages="$((packages+=$(ls -d /var/db/pkg/*/* | wc -l)))" @@ -530,12 +531,7 @@ getwm() { "Windows") wm="$(tasklist | grep -m 1 -o "bugn\|Windawesome\|blackbox\|emerge\|litestep")" [ "$wm" == "blackbox" ] && wm="bbLean (Blackbox)" - - if [ "$wm" ]; then - wm="$wm, Explorer" - else - wm="Explorer" - fi + wm="${wm:+$wm, }Explorer" ;; esac fi @@ -746,110 +742,27 @@ getcpu() { "iPhone OS") case "${ios_model:-$(uname -m)}" in - "iPhone1,1" | "iPhone1,2" | "iPod1,1") - cpu="Samsung S5L8900 @ 412MHz" - cores="1" - ;; - - "iPhone2,1") - cpu="Samsung S5PC100 @ 600MHz" - cores="1" - ;; - - "iPhone3,1" | "iPhone3,2" | "iPhone3,3" | "iPod4,1") - cpu="Apple A4 @ 800MHz" - cores="1" - ;; - - "iPhone4,1" | "iPod5,1") - cpu="Apple A5 @ 800MHz" - cores="2" - ;; - - "iPhone5,1" | "iPhone5,2" | "iPhone5,3" | "iPhone5,4") - cpu="Apple A6 @ 1.3GHz" - cores="2" - ;; - - "iPhone6,1" | "iPhone6,2") - cpu="Apple A7 @ 1.3GHz" - cores="2" - ;; - - "iPhone7,1" | "iPhone7,2") - cpu="Apple A8 @ 1.4GHz" - cores="2" - ;; - - "iPhone8,1" | "iPhone8,2" | "iPhone8,4") - cpu="Apple A9 @ 1.85GHz" - cores="2" - ;; - - "iPod2,1") - cpu="Samsung S5L8720 @ 533MHz" - cores="1" - ;; - - "iPod3,1") - cpu="Samsung S5L8922 @ 600MHz" - cores="1" - ;; - - "iPod7,1") - cpu="Apple A8 @ 1.1GHz" - cores="2" - ;; - - "iPad1,1") - cpu="Apple A4 @ 1GHz" - cores="1" - ;; - - "iPad2,1" | "iPad2,2" | "iPad2,3" | "iPad2,4" | "iPad2,5" | "iPad2,6" | "iPad2,7") - cpu="Apple A5 @ 1GHz" - cores="2" - ;; - - "iPad3,1" | "iPad3,2" | "iPad3,3") - cpu="Apple A5X @ 1GHz" - cores="2" - ;; - - "iPad3,4" | "iPad3,5" | "iPad3,6") - cpu="Apple A6X @ 1.4GHz" - cores="2" - ;; - - "iPad4,1" | "iPad4,2" | "iPad4,3") - cpu="Apple A7 @ 1.4GHz" - cores="2" - ;; - - "iPad4,4" | "iPad4,5" | "iPad4,6" | "iPad4,7" | "iPad4,8" | "iPad4,9") - cpu="Apple A7 @ 1.4GHz" - cores="2" - ;; - - "iPad5,1" | "iPad5,2") - cpu="Apple A8 @ 1.5GHz" - cores="2" - ;; - - "iPad5,3" | "iPad5,4") - cpu="Apple A8X @ 1.5GHz" - cores="3" - ;; - - "iPad6,3" | "iPad6,4") - cpu="Apple A9X @ 2.16GHz" - cores="2" - ;; - - "iPad6,7" | "iPad6,8") - cpu="Apple A9X @ 2.26GHz" - cores="2" - ;; + "iPhone1,"[1-2] | "iPod1,1") cpu="Samsung S5L8900 (1) @ 412MHz" ;; + "iPhone2,1") cpu="Samsung S5PC100 (1) @ 600MHz" ;; + "iPhone3,"[1-3] | "iPod4,1") cpu="Apple A4 (1) @ 800MHz" ;; + "iPhone4,1" | "iPod5,1") cpu="Apple A5 (2) @ 800MHz" ;; + "iPhone5,"[1-4]) cpu="Apple A6 (2) @ 1.3GHz" ;; + "iPhone6,"[1-2]) cpu="Apple A7 (2) @ 1.3GHz" ;; + "iPhone7,"[1-2]) cpu="Apple A8 (2) @ 1.4GHz" ;; + "iPhone8,"[1-4]) cpu="Apple A9 (2) @ 1.85GHz" ;; + "iPod2,1") cpu="Samsung S5L8720 (1) @ 533MHz" ;; + "iPod3,1") cpu="Samsung S5L8922 (1) @ 600MHz" ;; + "iPod7,1") cpu="Apple A8 (2) @ 1.1GHz" ;; + "iPad1,1") cpu="Apple A4 (1) @ 1GHz" ;; + "iPad2,"[1-7]) cpu="Apple A5 (2) @ 1GHz" ;; + "iPad3,"[1-3]) cpu="Apple A5X (2) @ 1GHz" ;; + "iPad3,"[4-6]) cpu="Apple A6X (2) @ 1.4GHz" ;; + "iPad4,"[1-3]) cpu="Apple A7 (2) @ 1.4GHz" ;; + "iPad4,"[4-9]) cpu="Apple A7 (2) @ 1.4GHz" ;; + "iPad5,"[1-2]) cpu="Apple A8 (2) @ 1.5GHz" ;; + "iPad5,"[3-4]) cpu="Apple A8X (3) @ 1.5GHz" ;; + "iPad6,"[3-4]) cpu="Apple A9X (2) @ 2.16GHz" ;; + "iPad6,"[7-8]) cpu="Apple A9X (2) @ 2.26GHz" ;; esac ;;