From 88cc9e6c42d1b8b88b7787ad08eb3084fb6422b7 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 30 May 2020 20:38:08 -0400 Subject: [PATCH] still needed in some cases --- .local/bin/statusbar/nettraf | 1 + 1 file changed, 1 insertion(+) 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)))"