compacted nettraf display

modified:   .config/coc/extensions/db.json
	modified:   .local/bin/statusbar/nettraf
This commit is contained in:
Alexander Bocken 2020-07-09 12:54:20 +02:00
parent 142229d330
commit 33eb3b709a
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
{ {
"lastUpdate": 1594097478969 "lastUpdate": 1594283334586
} }

View File

@ -33,6 +33,6 @@ tx_avg=$(( "$tx" / "$timedifference" ))
#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) printf "⬇%4sB/s|⬆%4sB/s\\n" $(numfmt --to=iec $rx_avg) $(numfmt --to=iec $tx_avg) | sed 's/ //g'
fi fi
date +'%s' > $lasttime date +'%s' > $lasttime