summaryrefslogtreecommitdiff
path: root/config/essentials/vis/cursors.lua
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-20 23:46:00 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-20 23:46:00 +0200
commita0f45aece21a6280633023ec84f60eb0d5e0849a (patch)
tree3d8d0e8294e84606ffea97e524be1cb94cdf8cb4 /config/essentials/vis/cursors.lua
parent2f8816e47e0797083a667d5cf7e778940dd1f789 (diff)
checkpoint
Diffstat (limited to 'config/essentials/vis/cursors.lua')
-rw-r--r--config/essentials/vis/cursors.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/essentials/vis/cursors.lua b/config/essentials/vis/cursors.lua
index 37165b6..5b3d43b 100644
--- a/config/essentials/vis/cursors.lua
+++ b/config/essentials/vis/cursors.lua
@@ -6,7 +6,7 @@ local files = {}
M.maxsize = 1000
-- get the default system cache directory
-local get_default_cache_path = function()
+local function get_default_cache_path()
local HOME = os.getenv('HOME')
local XDG_CACHE_HOME = os.getenv('XDG_CACHE_HOME')
local BASE = XDG_CACHE_HOME or HOME
@@ -16,7 +16,7 @@ end
-- default save path
M.path = get_default_cache_path()
-local read_files = function()
+local function read_files()
-- read file
local file = io.open(M.path)
@@ -36,10 +36,10 @@ local read_files = function()
end
-- read cursors from file on init
-local on_init = function() read_files() end
+local function on_init() read_files() end
-- apply cursor pos on win open
-local on_win_open = function(win)
+local function on_win_open(win)
if win.file == nil or win.file.path == nil then return end
@@ -58,7 +58,7 @@ local on_win_open = function(win)
end
-- set cursor pos on close
-local on_win_close = function(win)
+local function on_win_close(win)
if win.file == nil or win.file.path == nil then return end
@@ -81,7 +81,7 @@ local on_win_close = function(win)
end
-- write cursors to file on quit
-local on_quit = function()
+local function on_quit()
local file = io.open(M.path, 'w+')
if file == nil then return end