summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/statusbar/nettraf2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/statusbar/nettraf b/.local/bin/statusbar/nettraf
index 82305c3..1de6801 100755
--- a/.local/bin/statusbar/nettraf
+++ b/.local/bin/statusbar/nettraf
@@ -11,7 +11,7 @@ case "$BLOCK_BUTTON" in
esac
logfile="${XDG_CACHE_HOME:-$HOME/.cache}/netlog"
-prevdata="$(cat "$logfile")"
+prevdata="$(cat "$logfile")" || echo "0 0" > "$logfile"
rxcurrent="$(($(paste -d '+' /sys/class/net/[ew]*/statistics/rx_bytes)))"
txcurrent="$(($(paste -d '+' /sys/class/net/[^lo]*/statistics/tx_bytes)))"