diff options
Diffstat (limited to 'widgets/now.lua')
| -rw-r--r-- | widgets/now.lua | 10 |
1 files changed, 1 insertions, 9 deletions
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 |
