This commit is contained in:
Luke Smith 2020-05-30 14:09:39 -04:00
parent 307f408914
commit 52d9140820
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252

View file

@ -14,7 +14,7 @@ logfile="${XDG_CACHE_HOME:-$HOME/.cache}/netlog"
prevdata="$(cat "$logfile")" || echo "0 0" > "$logfile"
rxcurrent="$(($(paste -d '+' /sys/class/net/[ew]*/statistics/rx_bytes)))"
txcurrent="$(($(paste -d '+' /sys/class/net/[^lo]*/statistics/tx_bytes)))"
txcurrent="$(($(paste -d '+' /sys/class/net/[ew]*/statistics/tx_bytes)))"
printf "🔻%sKiB 🔺%sKiB\\n" \
"$(((rxcurrent-${prevdata%% *})/1024))" \