diff --git a/neofetch b/neofetch index d0011a13..87830da8 100755 --- a/neofetch +++ b/neofetch @@ -343,7 +343,7 @@ getuptime() { getpackages() { case "$os" in - "Linux" | "iPhone OS") + "Linux" | "iPhone OS" | "Solaris") type -p pacman >/dev/null 2>&1 && \ packages="$(pacman -Qq --color never | wc -l)" @@ -367,6 +367,7 @@ getpackages() { type -p pkg >/dev/null 2>&1 && \ packages="$((packages+=$(ls -1 /var/db/pkg | wc -l)))" + [ "$packages" == "0" ] && packages="$((packages+=$(pkg list | wc -l)))" type -p emerge >/dev/null 2>&1 && \ packages="$((packages+=$(ls -d /var/db/pkg/*/* | wc -l)))" @@ -426,10 +427,6 @@ getpackages() { [ -d "/cygdrive/c/ProgramData/chocolatey/lib" ] && \ packages="$((packages+=$(ls -1 /cygdrive/c/ProgramData/chocolatey/lib | wc -l)))" ;; - - "Solaris") - packages="$(pkg list | wc -l)" - ;; esac }