aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/sky.lua
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-18 14:45:35 +0200
committerDanilo M. <danix@danix.xyz>2026-10-18 14:45:35 +0200
commitb4451efb0f957d3cd3d9750f903899d8a87e15f3 (patch)
tree30ba3bd158f3b77404227edffb6eda8cf1c4309e /widgets/sky.lua
parent1d8b815d10e33b53c4e7d3f2668b3529a6e11c22 (diff)
downloadconky-theme-udt-b4451efb0f957d3cd3d9750f903899d8a87e15f3.tar.gz
conky-theme-udt-b4451efb0f957d3cd3d9750f903899d8a87e15f3.zip
fix(weather cards): review fixes
Hour and day labels go through weather.clock, hourly clamps rain chance and caps at 24 hours, week widens the scale by min and max together and sizes the glyph apart from the text, details compass letters never exceed row text, now always hints at the fetcher. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'widgets/sky.lua')
-rw-r--r--widgets/sky.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/widgets/sky.lua b/widgets/sky.lua
index aa0ad43..7dbc399 100644
--- a/widgets/sky.lua
+++ b/widgets/sky.lua
@@ -38,7 +38,7 @@ local function draw_arc(cr, x, y, w, h, colors, rise, set, now)
cairo_curve_to(cr, c1[1], c1[2], c2[1], c2[2], p3[1], p3[2])
cairo_stroke(cr)
- local t = weather.sun_t(now, rise, set) or 0
+ local t = weather.sun_t(now, rise, set)
local function bez(a, b, c, d)
local u = 1 - t
return u * u * u * a + 3 * u * u * t * b + 3 * u * t * t * c + t * t * t * d
@@ -64,8 +64,8 @@ function M.draw(cr, rect, colors)
local rise, set = w.sun.rise, w.sun.set
local phase, lit = weather.moon(now)
local rows = {
- { 'SUNRISE', os.date('%H:%M', rise) },
- { 'SUNSET', os.date('%H:%M', set) },
+ { 'SUNRISE', weather.clock(rise) },
+ { 'SUNSET', weather.clock(set) },
{ 'DAYLIGHT', weather.duration(set - rise) },
{ 'MOON', weather.num(lit * 100, '%') },
}