1
0
Fork 0
This commit is contained in:
Luca Bilke 2024-02-03 18:57:22 +01:00
parent 94b2de92aa
commit 1e71eeaf6e
1 changed files with 3 additions and 0 deletions

View File

@ -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"