♻️ refactor(cache-stats)!: refactor the wakatime and music stats modules
Modules now spawn the scripts automatically at startup and kill them at exit. Both stats are handled by a single script and a lockfile is used to avoid multiple instances spawning. BREAKING CHANGE: Please remove any user services previously used to spawn scripts.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Cache Stats │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
|
||||
local M = {}
|
||||
|
||||
local config_dir = vim.fn.stdpath("config")
|
||||
local cache_script = config_dir .. "/scripts/update_cache.sh"
|
||||
|
||||
-- Function to run the cache update script using vim.system
|
||||
function M.setup_script()
|
||||
vim.system({ cache_script }, { detach = true }, function() end)
|
||||
end
|
||||
|
||||
M.setup_script()
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user