From 32e10b1d6962afd04a209f300ebb8ab9ee29f070 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 17 Sep 2026 12:40:10 +0200 Subject: fix: stop the widgets from stalling or raising the draw Memoize hwmon_dir by chip name so sensor reads no longer popen grep on every frame, cache misses included. Floor fractional byte counts in card.human so it cannot raise. Drop the GPU package-temperature row, which duplicated the headline. Set umask before mkdir in both samplers so a fresh cache directory is not world-readable. Make render.lua exit non-zero on a draw error and tolerate an unset HOME. --- test/render.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/render.lua b/test/render.lua index 7d48d0e..3ed5f7e 100644 --- a/test/render.lua +++ b/test/render.lua @@ -29,7 +29,9 @@ local sw, sh = 2560, 1080 -- The palette, read from the rendered conky.conf exactly as dashboard.lua -- does, so the PNG uses the real scheme rather than invented colours. local function config_colors() - local path = os.getenv('HOME') .. '/.config/conky/conky.conf' + local home = os.getenv('HOME') + if not home then return {} end + local path = home .. '/.config/conky/conky.conf' local f = io.open(path, 'r') if not f then return {} end local src = f:read('*a') @@ -79,7 +81,10 @@ if not ok then os.exit(1) end local drew, err = pcall(mod.draw, cr, rect, colors) -if not drew then print('DRAW ERROR: ' .. tostring(err)) end +if not drew then + print('DRAW ERROR: ' .. tostring(err)) + os.exit(1) +end cairo_destroy(cr) cairo_surface_write_to_png(surf, out) -- cgit v1.2.3