Fix blank cpu speed on DragonFlyBSD
This commit is contained in:
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
|
||||||
|
|||||||
Reference in New Issue
Block a user