summaryrefslogtreecommitdiffstats
path: root/.local/bin/statusbar/nettraf
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-05-30 20:38:08 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-05-30 20:38:08 -0400
commit88cc9e6c42d1b8b88b7787ad08eb3084fb6422b7 (patch)
tree3a2284c8e4c638e55edf6f371cd9eee588f5e518 /.local/bin/statusbar/nettraf
parent5dbff5988208577d204d96045c161d872d29c2e1 (diff)
downloadeibhear-88cc9e6c42d1b8b88b7787ad08eb3084fb6422b7.tar.gz
eibhear-88cc9e6c42d1b8b88b7787ad08eb3084fb6422b7.tar.zst
eibhear-88cc9e6c42d1b8b88b7787ad08eb3084fb6422b7.zip
still needed in some cases
Diffstat (limited to '.local/bin/statusbar/nettraf')
-rwxr-xr-x.local/bin/statusbar/nettraf1
1 files changed, 1 insertions, 0 deletions
diff --git a/.local/bin/statusbar/nettraf b/.local/bin/statusbar/nettraf
index 8ebe8b5..c9b003f 100755
--- a/.local/bin/statusbar/nettraf
+++ b/.local/bin/statusbar/nettraf
@@ -11,6 +11,7 @@ case "$BLOCK_BUTTON" in
esac
logfile="${XDG_CACHE_HOME:-$HOME/.cache}/netlog"
+[ -f "$logfile" ] || echo "0 0" > "$logfile"
read -r rxprev txprev < "$logfile"
rxcurrent="$(($(paste -d '+' /sys/class/net/[ew]*/statistics/rx_bytes)))"