Fix blank cpu speed on DragonFlyBSD
This commit is contained in:
parent
5a87bed817
commit
11c869b50e
1 changed files with 2 additions and 1 deletions
3
neofetch
3
neofetch
|
@ -1105,7 +1105,8 @@ getcpu () {
|
||||||
cpu=${cpu/ @*}
|
cpu=${cpu/ @*}
|
||||||
|
|
||||||
# Get cpu speed
|
# Get cpu speed
|
||||||
speed=$(sysctl -n hw.cpuspeed hw.clockrate 2>/dev/null)
|
speed=$(sysctl -n hw.cpuspeed)
|
||||||
|
[ -z "$speed" ] && speed=$(sysctl -n hw.clockrate)
|
||||||
speed=$((speed / 100))
|
speed=$((speed / 100))
|
||||||
|
|
||||||
# Get cpu cores
|
# Get cpu cores
|
||||||
|
|
Loading…
Reference in a new issue