diff --git a/.local/libexec/statusbar/sb-nettraf b/.local/libexec/statusbar/sb-nettraf index 9fe8bbb0d..37960b5b6 100755 --- a/.local/libexec/statusbar/sb-nettraf +++ b/.local/libexec/statusbar/sb-nettraf @@ -1,4 +1,6 @@ #!/bin/sh +# . "$HOME/.local/libexec/statusbar/colors" +# TODO: Coloring based on speed update() { sum=0 @@ -14,4 +16,5 @@ update() { rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes) tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes) + printf "%b%5sB %b%5sB%b" "" "$(numfmt --to=iec "$rx")" "" "$(numfmt --to=iec "$tx")" "\n"