mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 19:49:54 +00:00
Added cpu speed for *BSD
This commit is contained in:
9
fetch
9
fetch
@@ -554,6 +554,15 @@ getcpu () {
|
|||||||
|
|
||||||
*"BSD")
|
*"BSD")
|
||||||
cpu="$(sysctl -n hw.model)"
|
cpu="$(sysctl -n hw.model)"
|
||||||
|
cpu=${cpu/ @*/}
|
||||||
|
cpu=${cpu// /}
|
||||||
|
cpu=${cpu% }
|
||||||
|
|
||||||
|
speed=$(sysctl -n hw.cpuspeed)
|
||||||
|
speed=$((speed / 100))
|
||||||
|
speed=${speed:0:1}.${speed:1}
|
||||||
|
|
||||||
|
cpu="$cpu @ ${speed}GHz"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
|
|||||||
Reference in New Issue
Block a user