diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-18 15:06:26 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-18 15:06:26 +0200 |
| commit | 9001b61dd3d48b7dedff40810cf258cbc3b41fee (patch) | |
| tree | a230422e5e635e9a6ad7e5ff9ad3bcbd67d28463 /lib/weather.lua | |
| parent | 4be7664c5fcc9c081dca5fb40ec4b9e0a2cc7bd3 (diff) | |
| download | conky-theme-udt-9001b61dd3d48b7dedff40810cf258cbc3b41fee.tar.gz conky-theme-udt-9001b61dd3d48b7dedff40810cf258cbc3b41fee.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'lib/weather.lua')
| -rw-r--r-- | lib/weather.lua | 18 |
1 files changed, 0 insertions, 18 deletions
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 |
