diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-09-14 19:44:22 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-09-14 19:51:30 +0200 |
commit | ec1d54c1f4d99330a8192350aa5e5143591e209b (patch) | |
tree | a5831de8a7f8bf99a0dc9673543cb463989ec982 | |
parent | f86c584fc2d4a2bab47df0cd5d187dd81fb71856 (diff) | |
download | vis-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.lua | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |