From 1e71eeaf6e065aec67148167df07adb7a6a33967 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Sat, 3 Feb 2024 18:57:22 +0100 Subject: [PATCH] add todo --- .local/libexec/statusbar/sb-nettraf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.local/libexec/statusbar/sb-nettraf b/.local/libexec/statusbar/sb-nettraf index 9fe8bbb0..37960b5b 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"