diff --git a/neofetch b/neofetch index 81ca21f7..f3d3aad5 100755 --- a/neofetch +++ b/neofetch @@ -497,6 +497,9 @@ getdistro () { # Workaround for PCBSD as uname still displays FreeBSD. [ -f "/etc/pcbsd-lang" ] && distro="PCBSD" + + # Workaround for PacBSD as uname displays FreeBSD. + [ -f "/etc/pacbsd-release" ] && distro="PacBSD" ;; "Windows") @@ -692,11 +695,15 @@ getpackages () { ;; "BSD") - if type -p pkg_info >/dev/null 2>&1; then - packages="$(pkg_info | wc -l)" - - elif type -p pkg >/dev/null 2>&1; then - packages="$(pkg info | wc -l)" + # PacBSD has both pacman and pkg, but only pacman is used + if [[ "$distro" == "PacBSD"* ]]; then + packages="$(pacman -Qq --color never | wc -l)" + else + if type -p pkg_info >/dev/null 2>&1; then + packages="$(pkg_info | wc -l)" + elif type -p pkg >/dev/null 2>&1; then + packages="$(pkg info | wc -l)" + fi fi ;;