aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-16 19:29:10 +0200
committerDanilo M. <danix@danix.xyz>2026-09-16 19:29:10 +0200
commite10bfebb1a908230244e33e970f4750d84ff1b35 (patch)
treef94bf19541613b0a773b3f545985084355c91486 /widgets
parent9c8157beb67018f5ecc94917d067b5c96aa8c328 (diff)
downloadconky-theme-udt-e10bfebb1a908230244e33e970f4750d84ff1b35.tar.gz
conky-theme-udt-e10bfebb1a908230244e33e970f4750d84ff1b35.zip
fix: read the palette from the config file, and stop leaking extents
Two defects, both found by review of the Cairo work and both confirmed by experiment rather than reasoning. The palette mechanism could not have worked. conky_parse('${color3}') returns an empty string: conky's colour variables emit renderer escape codes into conky.text, they never evaluate to a hex string, and ${default_shade_color} is not a variable at all, so conky_parse hands the literal text back. conky.config is not exposed to Lua either (_G.conky is nil) and conky_info carries only cpu_count and update_interval. What Lua does get is conky_config, the config file's path, so the colours are now parsed out of that file, where UDT has already substituted real hex. The pattern needs [%w_]+ rather than %w+ or it misses default_color and default_shade_color. The card fill also duplicated the border colour, both being color3, so filling at 0.55 alpha and stroking the hairline at 0.9 in one hue made the border invisible and the cards read as blobs rather than the mockup's thin outlines. The fill is default_shade_color now, a role every scheme already defines. card.measure allocated a cairo_text_extents_t per call, which leaks: 5000 allocations grow Lua's heap by 182KB that GC never reclaims, and :destroy() on each does not help, measured at the same 182KB. One reused module-level struct costs 0KB. A draw hook running every 2s would have bled memory for as long as conky stayed up, which no screenshot would ever reveal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'widgets')
0 files changed, 0 insertions, 0 deletions