Don't print CPU if it's empty
This commit is contained in:
parent
0e0df9d03e
commit
16f395c462
3
neofetch
3
neofetch
|
@ -1051,8 +1051,7 @@ getcpu () {
|
||||||
# Trim whitespace
|
# Trim whitespace
|
||||||
cpu=${cpu//+( )/ }
|
cpu=${cpu//+( )/ }
|
||||||
|
|
||||||
# Add CPU info bar
|
[ ! -z "$cpu" ] && prin "$subtitle" "$cpu"
|
||||||
prin "$subtitle" "$cpu"
|
|
||||||
|
|
||||||
if [ "$cpu_display" != "off" ]; then
|
if [ "$cpu_display" != "off" ]; then
|
||||||
cpu_usage="$(ps aux | awk 'BEGIN { sum = 0 } { sum += $3 }; END { print sum }')"
|
cpu_usage="$(ps aux | awk 'BEGIN { sum = 0 } { sum += $3 }; END { print sum }')"
|
||||||
|
|
Reference in New Issue