mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-23 20:12:31 +00:00
Turns out other *BSD distros don't have hw.cpuspeed
This commit is contained in:
6
fetch
6
fetch
@@ -552,7 +552,7 @@ getcpu () {
|
||||
cpu="$(sysctl -n machdep.cpu.brand_string)"
|
||||
;;
|
||||
|
||||
*"BSD")
|
||||
"OpenBSD")
|
||||
cpu="$(sysctl -n hw.model)"
|
||||
cpu=${cpu/ @*/}
|
||||
cpu=${cpu// /}
|
||||
@@ -565,6 +565,10 @@ getcpu () {
|
||||
cpu="$cpu @ ${speed}GHz"
|
||||
;;
|
||||
|
||||
*"BSD")
|
||||
cpu="$(sysctl -n hw.model)"
|
||||
;;
|
||||
|
||||
"Windows")
|
||||
# Get cpu name
|
||||
cpu="$(grep -F 'model name' /proc/cpuinfo)"
|
||||
|
||||
Reference in New Issue
Block a user