From 988216561758e7ebf942b91e786d44b7f3b75deb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Oct 2016 20:27:35 +1100 Subject: [PATCH] Add support for Solaris --- neofetch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 2ef2333a..2014644b 100755 --- a/neofetch +++ b/neofetch @@ -893,8 +893,11 @@ getcpu() { speed="$(psrinfo -v | awk '/operates at/ {print $6}')" speed="$((speed / 100))" - # Get cpu cores - cores="$(kstat -m cpu_info | grep -c "chip_id")" + # Show/hide hyperthreaded cores + case "$cpu_cores" in + "logical" | "on") cores="$(kstat -m cpu_info | grep -c "chip_id")" ;; + "physical") cores="$(psrinfo -p)" ;; + esac # Fix for speeds under 1ghz if [ -z "${speed:1}" ]; then