dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit d8272650bd675011496b4825160510109e47bba5
parent 884dcbdc4792eed95e558af84491eb3100d314a2
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sat, 30 May 2020 11:09:12 -0400

paste directly on files, excluding lo

Diffstat:
M.local/bin/statusbar/nettraf | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.local/bin/statusbar/nettraf b/.local/bin/statusbar/nettraf @@ -13,8 +13,8 @@ esac logfile="${XDG_CACHE_HOME:-$HOME/.cache}/netlog" prevdata="$(cat "$logfile")" -rxcurrent="$(($(cat /sys/class/net/*/statistics/rx_bytes | paste -sd '+')))" -txcurrent="$(($(cat /sys/class/net/*/statistics/tx_bytes | paste -sd '+')))" +rxcurrent="$(($(paste -d '+' /sys/class/net/[ew]*/statistics/rx_bytes)))" +txcurrent="$(($(paste -d '+' /sys/class/net/[^lo]*/statistics/tx_bytes)))" printf "🔻%sKiB 🔺%sKiB\\n" \ "$(((rxcurrent-${prevdata%% *})/1024))" \