From a531a73e99b84a455e8d46cd9e9c5ab4dba8c350 Mon Sep 17 00:00:00 2001 From: David Delarosa Date: Wed, 25 May 2022 14:01:06 +0300 Subject: [PATCH] Use tmpfs for speed and I/O reduction --- .local/bin/statusbar/sb-nettraf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/sb-nettraf b/.local/bin/statusbar/sb-nettraf index c71d38e9..178f6773 100755 --- a/.local/bin/statusbar/sb-nettraf +++ b/.local/bin/statusbar/sb-nettraf @@ -17,7 +17,7 @@ update() { read -r i < "$arg" sum=$(( sum + i )) done - cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/} + cache=/tmp/${1##*/} [ -f "$cache" ] && read -r old < "$cache" || old=0 printf %d\\n "$sum" > "$cache" printf %d\\n $(( sum - old ))