Status bar fixes for nettraf and memory (#627)
* More precise RAM measurement and fix of memory type * Should be KiB kB refers to https://en.wikipedia.org/wiki/Kibibyte
This commit is contained in:
@@ -16,7 +16,7 @@ txfile="${XDG_CACHE_HOME:-$HOME/.cache}/txlog"
|
||||
rxcurrent="$(cat /sys/class/net/*/statistics/rx_bytes | paste -sd '+' | bc)"
|
||||
txcurrent="$(cat /sys/class/net/*/statistics/tx_bytes | paste -sd '+' | bc)"
|
||||
|
||||
printf "🔻%skB 🔺%skB\\n" \
|
||||
printf "🔻%sKiB 🔺%sKiB\\n" \
|
||||
"$(printf -- "(%s-%s)/1024\\n" "$rxcurrent" "$(cat "$rxfile")" | bc)" \
|
||||
"$(printf -- "(%s-%s)/1024\\n" "$txcurrent" "$(cat "$txfile")" | bc)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user