aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlend Lind Madsen <erlendf80@gmail.com>2020-12-15 05:58:05 +0100
committerErlend Lind Madsen <erlendf80@gmail.com>2020-12-15 05:58:05 +0100
commit36748fb413ea2e6bc1d73c2dd7edc50bc83c333f (patch)
tree5a2c6eae1a15c40ec9bc7fdb5dfc6802beba35d2
parent34304010bb8ee83666fc73808c474c5b93c32539 (diff)
downloadvis-cursors-36748fb413ea2e6bc1d73c2dd7edc50bc83c333f.tar.gz
clean up cursors path
-rw-r--r--init.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 39ba313..09b3f07 100644
--- a/init.lua
+++ b/init.lua
@@ -1,11 +1,10 @@
local M = {}
local cursors = {}
+local HOME = os.getenv('HOME')
local XDG_CACHE_HOME = os.getenv('XDG_CACHE_HOME')
-if XDG_CACHE_HOME then
- M.path = XDG_CACHE_HOME .. '/cursors'
-else
- M.path = os.getenv('HOME') .. '/.cursors'
-end
+local BASE = XDG_CACHE_HOME or HOME
+
+M.path = BASE .. '/.cursors'
function apply_cursor_pos(win)
if win.file == nil or win.file.path == nil then return end