aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard.lua
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-16 19:41:08 +0200
committerDanilo M. <danix@danix.xyz>2026-09-16 19:41:08 +0200
commit9c8947ab8dea5709ea83992c14e663214a571833 (patch)
tree23cfafef5f447fb32d0bcfb929f2a0a0eb11cdd1 /dashboard.lua
parent9c9be25bdb0b2ec48e3078fe5e119b3d0f56631c (diff)
downloadconky-theme-udt-9c8947ab8dea5709ea83992c14e663214a571833.tar.gz
conky-theme-udt-9c8947ab8dea5709ea83992c14e663214a571833.zip
test: check grid maths on both real screen sizes
The grid's justification is that one layout table works on differently shaped screens, so assert it: every cell lands inside the margins at 2560x1080 and 1920x1080, a spanning cell absorbs the gap it covers, and no shipped layout entry falls outside the declared grid. dashboard.lua exports its internals for this; cairo and lib.card are stubbed via package.preload since they only exist inside Conky. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'dashboard.lua')
-rw-r--r--dashboard.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/dashboard.lua b/dashboard.lua
index b814be7..af6e51c 100644
--- a/dashboard.lua
+++ b/dashboard.lua
@@ -95,6 +95,11 @@ local function rect_for(entry, sw, sh)
}
end
+-- Exported for test/test_layout.lua. The grid's whole claim is that one layout
+-- table works on differently shaped screens, which is worth checking.
+conky_dashboard_internal = { rect_for = rect_for, COLS = COLS, ROWS = ROWS,
+ GAP = GAP, MARGIN = MARGIN, layout = layout }
+
-- Widget modules, loaded once and cached. A widget that fails to load must not
-- take the frame down with it, so the require is wrapped.
local widgets = {}