diff --git a/conky.conf b/conky.conf index d473b44..a89a8f5 100644 --- a/conky.conf +++ b/conky.conf @@ -31,8 +31,7 @@ conky.config = { --Lua Load lua_load = '~/.config/conky/main.lua', lua_draw_hook_post = 'main', - lua_startup_hook = string.format('start %f', update_interval), - lua_shutdown_hook = 'stop' + lua_startup_hook = string.format('start %f', update_interval) } --control updates entirely in lua diff --git a/main.lua b/main.lua index ac67171..60ccfea 100644 --- a/main.lua +++ b/main.lua @@ -38,10 +38,6 @@ function conky_start(update_interval) local devices = {'sda', 'nvme0n1'} local battery = 'BAT0' local fs_paths = {'/', '/boot', '/home', '/mnt/data', '/mnt/dcache', "/tmp"} - local STATS_FILE = '/tmp/.conky_pacman' - - -- TODO so far this seems like the best way to 'fork' a process from conky - i_o.execute_cmd('systemctl --user start conky_pacman.timer') local mem = memory(update_freq) local rw = readwrite(update_freq, devices) @@ -61,6 +57,7 @@ function conky_start(update_interval) {pcm.static, fs.static, pwr.static, mem.static} ) + local STATS_FILE = '/tmp/.conky_pacman' draw_dynamic = function(cr, _updates) -- draw static components @@ -94,10 +91,6 @@ function conky_start(update_interval) end end -function conky_stop() - i_o.execute_cmd('systemctl --user stop conky_pacman.timer') -end - local updates = -2 -- this accounts for the first few spazzy iterations function conky_main()