From 16f395c462c539a241f1d26290ac8d04859d499b Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 12:42:36 +1000 Subject: [PATCH] Don't print CPU if it's empty --- neofetch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 3c2f3c32..12ebe9d4 100755 --- a/neofetch +++ b/neofetch @@ -1051,8 +1051,7 @@ getcpu () { # Trim whitespace cpu=${cpu//+( )/ } - # Add CPU info bar - prin "$subtitle" "$cpu" + [ ! -z "$cpu" ] && prin "$subtitle" "$cpu" if [ "$cpu_display" != "off" ]; then cpu_usage="$(ps aux | awk 'BEGIN { sum = 0 } { sum += $3 }; END { print sum }')"