diff options
author | Erlend Lind Madsen <erlendf80@gmail.com> | 2020-12-15 05:58:05 +0100 |
---|---|---|
committer | Erlend Lind Madsen <erlendf80@gmail.com> | 2020-12-15 05:58:05 +0100 |
commit | 36748fb413ea2e6bc1d73c2dd7edc50bc83c333f (patch) | |
tree | 5a2c6eae1a15c40ec9bc7fdb5dfc6802beba35d2 | |
parent | 34304010bb8ee83666fc73808c474c5b93c32539 (diff) | |
download | vis-cursors-36748fb413ea2e6bc1d73c2dd7edc50bc83c333f.tar.gz |
clean up cursors path
-rw-r--r-- | init.lua | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |