aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-09-14 19:44:22 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-09-14 19:51:30 +0200
commitec1d54c1f4d99330a8192350aa5e5143591e209b (patch)
treea5831de8a7f8bf99a0dc9673543cb463989ec982
parentf86c584fc2d4a2bab47df0cd5d187dd81fb71856 (diff)
downloadvis-cursors-devel.tar.gz
fix: don't use hidden subdirectory in XDG hierarchydevel
Using hidden subdirectories in the XDG hierarchy is in my opinion evil and it shouldn’t be done. Actually, using ~/.vis-cursor is really strange, because vis seems to be XDG-compliant per default and even ~/.vis directory is not in Lua path.
-rw-r--r--init.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index f59b27b..b2ffaab 100644
--- a/init.lua
+++ b/init.lua
@@ -9,8 +9,11 @@ M.maxsize = 1000
local get_default_cache_path = function()
local HOME = os.getenv('HOME')
local XDG_CACHE_HOME = os.getenv('XDG_CACHE_HOME')
- local BASE = XDG_CACHE_HOME or HOME
- return BASE .. '/.vis-cursors'
+ if XDG_CACHE_HOME then
+ return XDG_CACHE_HOME .. '/vis-cursors'
+ else
+ return HOME .. '/.vis-cursors'
+ end
end
-- default save path