From 11c869b50ecb30c26629e470bb3df33b8f3b5d5b Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 13 May 2016 09:22:44 +1000 Subject: [PATCH] Fix blank cpu speed on DragonFlyBSD --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index bce32f3e..06ebbcd1 100755 --- a/neofetch +++ b/neofetch @@ -1105,7 +1105,8 @@ getcpu () { cpu=${cpu/ @*} # 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)) # Get cpu cores