From f15e247027ae377369f393ba6757ded18e3833cf Mon Sep 17 00:00:00 2001 From: Rainer Wittmaack Date: Mon, 25 Jul 2022 10:34:17 -0500 Subject: [PATCH] make some sb scripts use dirs in HOME --- .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 178f6773..c71d38e9 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=/tmp/${1##*/} + cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/} [ -f "$cache" ] && read -r old < "$cache" || old=0 printf %d\\n "$sum" > "$cache" printf %d\\n $(( sum - old ))