aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-18 15:16:05 +0200
committerDanilo M. <danix@danix.xyz>2026-10-18 15:16:05 +0200
commit2081aa8dbc2e2b8aaec0aade6f74aa61ffc3bbca (patch)
tree5f188929e331ff4d65349a7da9934ebbb160fc42
parent1ed34aa44879296eef34bb0509e8b96533217f15 (diff)
downloadconky-theme-udt-2081aa8dbc2e2b8aaec0aade6f74aa61ffc3bbca.tar.gz
conky-theme-udt-2081aa8dbc2e2b8aaec0aade6f74aa61ffc3bbca.zip
feat(details): air under the compass, no empty strip under the rows
The compass goes back to the big slot's own size, leaving a gap above the WIND row. card.standard()'s height budget reserved about a fifth more than the header and rows draw; it now matches what is drawn plus a little air, which changes nothing on a card already at the size cap (compared pixel for pixel) and lets details drop to 3.75 rows at full type. sky moves up to take the space. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--dashboard.lua4
-rw-r--r--lib/card.lua7
-rw-r--r--widgets/details.lua3
3 files changed, 8 insertions, 6 deletions
diff --git a/dashboard.lua b/dashboard.lua
index d29479f..925fe4a 100644
--- a/dashboard.lua
+++ b/dashboard.lua
@@ -32,8 +32,8 @@ local layout = {
-- The forecast set, in the right side the quickshell moves left open.
{ widget = 'hourly', col = 10, row = 1, w = 7, h = 3 },
{ widget = 'week', col = 10, row = 4, w = 3.5, h = 5.5 },
- { widget = 'details', col = 13.5, row = 4, w = 3.5, h = 4.25 },
- { widget = 'sky', col = 13.5, row = 8.25, w = 3.5, h = 4.75 },
+ { widget = 'details', col = 13.5, row = 4, w = 3.5, h = 3.75 },
+ { widget = 'sky', col = 13.5, row = 7.75, w = 3.5, h = 5.25 },
}
-- ==========================================================================
diff --git a/lib/card.lua b/lib/card.lua
index 4163aae..3dd4b12 100644
--- a/lib/card.lua
+++ b/lib/card.lua
@@ -348,10 +348,13 @@ function M.standard(cr, inner, colors, spec)
groups[#groups + 1] = { { r[1], M.FONT_MONO, ROW_F },
{ r[2] == nil and '--' or tostring(r[2]), M.FONT_MONO, ROW_F } }
end
- -- Height in units of S: the header line, the gap under it, a step per row.
+ -- Height in units of S: the header line, a little air, a 0.64 step per row
+ -- (the first row's baseline sits 0.512 under the header, the last row's
+ -- descent takes about 0.1, so this leaves a few percent of slack and no
+ -- empty strip under the rows).
local head_f = (big or not spec.title) and BIG_F or LABEL_F * 1.2
local budget = inner.h * (spec.share or 1)
- local S = clamp(math.min(budget * 0.94 / (head_f + 0.5 + #rows * 0.66),
+ local S = clamp(math.min(budget / (head_f + 0.2 + #rows * 0.64),
M.fit_unit(cr, inner.w * 0.96, groups, 100)), 10, 72)
local label_size, row_size = S * LABEL_F, S * ROW_F
diff --git a/widgets/details.lua b/widgets/details.lua
index 36ce016..f5f23ad 100644
--- a/widgets/details.lua
+++ b/widgets/details.lua
@@ -79,8 +79,7 @@ function M.draw(cr, rect, colors)
card.standard(cr, inner, colors, {
icon = card.ICON.details, title = 'DETAILS', rows = rows,
big = function(cr, right, top, size)
- -- 1.2x the slot: the first row starts lower than the big text ends.
- draw_compass(cr, right, top, size * 1.2, colors, c.wind_deg)
+ draw_compass(cr, right, top, size, colors, c.wind_deg)
end,
})
end