From 5b3014f698efafae3a2250a438fab3c4dd56c5dd Mon Sep 17 00:00:00 2001
From: Maxime Ripard <mripard@kernel.org>
Date: Thu, 8 Jun 2023 15:30:31 +0200
Subject: [PATCH] dim: Move timestamp file to XDG_CACHE_HOME

XDG_CACHE_HOME is meant to hold "user-specific, non-essential data"
which seems like a good fit and avoids bloating ~.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
 dim | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dim b/dim
index 60d88fb..838d658 100755
--- a/dim
+++ b/dim
@@ -408,7 +408,8 @@ function check_for_updates
 {
 	local stamp stampfile
 
-	stampfile=$HOME/.dim-update-check-timestamp
+	stampfile=$DIM_CACHE_DIR/update-check-timestamp
+	mkdir -p $(dirname $stampfile)
 
 	# daily check for updates based on file timestamp
 	stamp=$(stat --printf=%Y $stampfile 2>/dev/null || echo -n 0)
-- 
GitLab