Don't print CPU if it's empty
This commit is contained in:
parent
0e0df9d03e
commit
16f395c462
1 changed files with 1 additions and 2 deletions
3
neofetch
3
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 }')"
|
||||
|
|
Loading…
Reference in a new issue