From 9001b61dd3d48b7dedff40810cf258cbc3b41fee Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 18 Oct 2026 15:06:26 +0200 Subject: feat(now): the condition as a large glyph instead of words The leftover height under the rows now holds the condition glyph, large, as the card's variable band. weather.describe() and its table had no other caller and go with the text. Co-Authored-By: Claude Opus 5.5 --- lib/weather.lua | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'lib') diff --git a/lib/weather.lua b/lib/weather.lua index 3cb7b64..28b3341 100644 --- a/lib/weather.lua +++ b/lib/weather.lua @@ -59,24 +59,6 @@ function M.icon(code, is_day) return I.unknown end -local DESCRIBE = { - [0] = 'Clear sky', [1] = 'Mainly clear', [2] = 'Partly cloudy', [3] = 'Overcast', - [45] = 'Fog', [48] = 'Rime fog', - [51] = 'Light drizzle', [53] = 'Drizzle', [55] = 'Dense drizzle', - [56] = 'Freezing drizzle', [57] = 'Freezing drizzle', - [61] = 'Light rain', [63] = 'Rain', [65] = 'Heavy rain', - [66] = 'Freezing rain', [67] = 'Freezing rain', - [71] = 'Light snow', [73] = 'Snow', [75] = 'Heavy snow', [77] = 'Snow grains', - [80] = 'Rain showers', [81] = 'Rain showers', [82] = 'Violent showers', - [85] = 'Snow showers', [86] = 'Snow showers', - [95] = 'Thunderstorm', [96] = 'Thunderstorm, hail', [99] = 'Thunderstorm, hail', -} - --- WMO code in words. Reading a nil key from a table is not an error. -function M.describe(code) - return DESCRIBE[code] or 'Unknown' -end - -- Nearest integer, or nil when v is NaN, infinite or too big for an integer: -- %d and utf8.char raise on those, and a raise is a blank dashboard. local function round(v) return math.tointeger(math.floor(v + 0.5)) end -- cgit v1.2.3