cleaned up nettraf

modified:   .local/bin/statusbar/nettraf
This commit is contained in:
Alexander Bocken 2020-09-06 23:22:15 +02:00
parent 447e13bffb
commit b52968cac9

View File

@ -39,6 +39,7 @@ fi
#only print if any traffic at all #only print if any traffic at all
if [ "$rx_avg" -gt 0 ] || [ "$tx_avg" -gt 0 ] if [ "$rx_avg" -gt 0 ] || [ "$tx_avg" -gt 0 ]
then then
printf "⬇%4sB/s|⬆%4sB/s\\n" $(numfmt --to=iec $rx_avg) $(numfmt --to=iec $tx_avg) | sed 's/ //g' #printf "⬇%4sB/s⬆%4sB/s\\n" $(numfmt --to=iec $rx_avg) $(numfmt --to=iec $tx_avg) | sed 's/ //g'
printf "⬇%sB/s ⬆%sB/s\\n" $(numfmt --to=iec $rx_avg) $(numfmt --to=iec $tx_avg)
fi fi
date +'%s' > $lasttime date +'%s' > $lasttime