aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-18 15:07:55 +0200
committerDanilo M. <danix@danix.xyz>2026-10-18 15:07:55 +0200
commit734c2ac8383bc6afe45796b416cb7c70a090d569 (patch)
treef8013723964ed82157dc5d1797acbb3fd5683dd1 /widgets
parent9001b61dd3d48b7dedff40810cf258cbc3b41fee (diff)
downloadconky-theme-udt-734c2ac8383bc6afe45796b416cb7c70a090d569.tar.gz
conky-theme-udt-734c2ac8383bc6afe45796b416cb7c70a090d569.zip
feat(now): the condition glyph stands in for the title, large
card.standard() without a title draws the icon alone at the big value's size, the glyph-for-title case DESIGN.md already allows. The now card uses it and drops the bottom glyph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/now.lua16
1 files changed, 3 insertions, 13 deletions
diff --git a/widgets/now.lua b/widgets/now.lua
index f00c46e..03a9ecc 100644
--- a/widgets/now.lua
+++ b/widgets/now.lua
@@ -26,21 +26,11 @@ function M.draw(cr, rect, colors)
{ 'UPDATED', weather.age_str(c.dt, now),
weather.is_stale(c.dt, now) and colors.warning or nil },
}
- local y, S = card.standard(cr, inner, colors, {
- icon = weather.icon(c.code, c.is_day), title = 'WEATHER',
+ -- No title: the condition glyph stands in for it, at the big value's size.
+ card.standard(cr, inner, colors, {
+ icon = weather.icon(c.code, c.is_day),
big = weather.deg(c.temp), rows = rows, share = 0.85,
})
-
- -- The condition as a large glyph, the card's variable band: the type is
- -- capped to match the other cards, so a tall cell leaves height over, and the
- -- glyph takes it. Dropped when there is no room for one bigger than a row.
- local size = math.min(inner.y + inner.h - y, inner.w * 0.45)
- if size > S * 0.6 then
- card.font(cr, card.FONT_MONO, size, false)
- card.rgba(cr, colors.highlight)
- card.text_centre(cr, inner.x + inner.w / 2, inner.y + inner.h - size * 0.15,
- weather.icon(c.code, c.is_day))
- end
end
return M