changed to awk command, added netbsd and windows
This commit is contained in:
parent
890d44c518
commit
26c04cf753
5
neofetch
5
neofetch
|
@ -851,7 +851,7 @@ getcpu () {
|
||||||
cpu="$cpu @ ${speed}GHz"
|
cpu="$cpu @ ${speed}GHz"
|
||||||
|
|
||||||
# Get cpu cores
|
# Get cpu cores
|
||||||
cores=$(nproc)
|
cores=$(awk -F ': ' '/siblings/ {printf $2; exit}' /proc/cpuinfo)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
|
@ -897,6 +897,9 @@ getcpu () {
|
||||||
"NetBSD"*) speed=$((speed / 10000)) ;;
|
"NetBSD"*) speed=$((speed / 10000)) ;;
|
||||||
"Windows"*) speed=$((speed / 100000)) ;;
|
"Windows"*) speed=$((speed / 100000)) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Get cpu cores
|
||||||
|
cores=$(awk -F ': ' '/siblings/ {printf $2; exit}' /proc/cpuinfo)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Reference in New Issue