From b4451efb0f957d3cd3d9750f903899d8a87e15f3 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 18 Oct 2026 14:45:35 +0200 Subject: 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 --- widgets/now.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'widgets/now.lua') diff --git a/widgets/now.lua b/widgets/now.lua index 8fc6843..1b797ae 100644 --- a/widgets/now.lua +++ b/widgets/now.lua @@ -14,15 +14,7 @@ function M.draw(cr, rect, colors) local inner = card.card(cr, rect, colors) local w = weather.parse(data.slurp(weather.CACHE)) if not w then - -- Closed explicitly: this branch reruns every frame until a fetch lands, - -- so an unclosed handle would accumulate one per draw. - local envf = io.open((os.getenv('HOME') or '') .. '/.config/udt/weather.env', 'r') - local hint = 'set ~/.config/udt/weather.env' - if envf then - envf:close() - hint = 'bin/weather-fetch.sh' - end - card.notice(cr, inner, colors, 'WEATHER', 'no weather data', hint) + card.notice(cr, inner, colors, 'WEATHER', 'no weather data', 'bin/weather-fetch.sh') return end -- cgit v1.2.3