Add cache support for CPU
This commit is contained in:
parent
c2557873fc
commit
7c6fcb789f
1 changed files with 7 additions and 2 deletions
5
neofetch
5
neofetch
|
@ -839,8 +839,13 @@ getcpu () {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
|
if [ -f "/Library/Caches/neofetch/cpu" ]; then
|
||||||
|
source "/Library/Caches/neofetch/cpu"
|
||||||
|
else
|
||||||
cpu="$(sysctl -n machdep.cpu.brand_string)"
|
cpu="$(sysctl -n machdep.cpu.brand_string)"
|
||||||
cores=$(sysctl -n hw.ncpu)
|
cores=$(sysctl -n hw.ncpu)
|
||||||
|
cache "cpu" "$cpu" "/Library/Caches/"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*"BSD" | "Windows")
|
*"BSD" | "Windows")
|
||||||
|
|
Loading…
Reference in a new issue