mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
CPU Usage: re-detect cores if set to physical or off
This commit is contained in:
2
neofetch
2
neofetch
@@ -967,7 +967,7 @@ get_cpu_usage() {
|
||||
|
||||
*)
|
||||
# Get CPU cores if unset.
|
||||
if [[ "$cpu_cores" == "off" ]]; then
|
||||
if [[ "$cpu_cores" != "logical" ]]; then
|
||||
case "$os" in
|
||||
"Linux" | "MINIX") cores="$(grep -c "^processor" /proc/cpuinfo)" ;;
|
||||
"Mac OS X") cores="$(sysctl -n hw.logicalcpu_max)" ;;
|
||||
|
Reference in New Issue
Block a user