| Age | Commit message (Collapse) | Author | Files | Lines |
|
Entry point, grid maths, palette parsing and widget dispatch.
Uses conky_surface(), not cairo_xlib_surface_create: under
out_to_wayland the Xlib drawable and visual are both nil, so the idiom
every Conky-Lua tutorial uses cannot work here.
The pcall overlay lands before any widget exists, because Conky reports
a Lua fault as a blank screen with no message on any stream. Verified
by injecting a fault and seeing it reported. A missing widget names
itself in its own cell rather than leaving the cell empty.
conky.conf here is a development config with literal colours; the
templated one arrives with the UDT wiring.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
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>
|
|
Rounded-rect card with a hairline border, text helpers with measured
alignment, and font selection.
Cairo's font API stops at BOLD, so the Black face is reached by family
name instead of weight: at size 90, '13' measures 100px as Noto Sans
Black against 94px as Bold, confirming the heavier face is selected.
The card radius is clamped to half the shorter side, because a larger
radius makes the corner arcs overlap into a bowtie.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
The test comment said "cpu_percent", but the API is new_cpu_counter()
plus :sample(). Prose only, the code was always consistent, but a
comment naming a nonexistent function sends the next reader looking
for it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Load is a delta, so one reading cannot yield a percentage. The first
call returns nil rather than a fabricated number: 100% on startup reads
as a real spike.
A non-advancing counter also returns nil instead of dividing by zero,
and the result is clamped because a suspend/resume can produce a
nonsense delta.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Parsers take file contents as a string, not a path, so they test
against committed fixtures with no filesystem mocking.
hwmon is globbed by its name file rather than a fixed index, carried
over from the old config: indices drift across kernel reorders and a
stale one silently reads a different chip.
Failure returns nil, never 0. A sensor reading 0 C is legitimate, so 0
cannot double as an error value.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
The live config is hyprland.lua requiring sections/, with rules
declared through an hl helper API, so the planned .conf fragment with
source = could not have worked. Task 8 now writes a Lua section using
hl.window_rule and hl.bind, matching the existing rules.
Three facts checked against the running config:
- keybindings.lua already binds SUPER+D to the unnamed special
workspace, so the dashboard takes SUPER+S.
- autostart.lua already runs a bare conky. The dashboard replaces it,
so that line changes rather than a new exec being added, which would
run two instances.
- The unnamed special workspace hosts the btop scratchpad, so the
dashboard gets its own special:dash.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Ten tasks, TDD where there is logic to test. Ordered so nothing
half-built touches the working desktop: pure Lua and its tests first,
then pixels, then the palette and the widget, then window placement,
and only last does UDT switch over to this repo's template.
Leads with the platform facts verified during design, because each one
invalidates the approach an implementer would otherwise reach for:
conky_surface() instead of the Xlib idiom on Wayland, own_window_type
normal rather than desktop, a Lua fault presenting as a blank screen,
grim capturing screen coordinates so it needs the dashboard's workspace
active, and Cairo having no Black font weight.
The pcall error overlay is built before any widget and verified by
injecting a deliberate fault, since it is the only channel that makes a
later mistake visible.
Fixture arithmetic in the parser tests is checked rather than asserted
from memory: a wrong expected value sends the implementer chasing a bug
that is not there.
Paths are ~-relative throughout, so the plan does not pin to one home
directory.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
A polybar backup script for OWM turned up, which beats the weather.com
scraper: it has a working condition mapping. Port the domain knowledge,
not the code.
Worth keeping: the OWM condition-id ranges, day/night selection against
sys.sunrise/sys.sunset, and the Beaufort wind thresholds. Becomes a
table in data.lua.
Not portable: polybar %{F}/%{T} format tokens, hardcoded hex (UDT roles
replace them), bc conversions (Lua arithmetic), one-line output (a
card). So the script shrinks to curl-and-cache and Lua does the rest.
The reference script hardcodes a live API key plus city and country. The
key and location move to ~/.config/udt/weather.env, outside the repo,
same reasoning as roles.conf. Nothing carries a key in-repo, and
weather.env is gitignored so a stray copy cannot be staged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Conky dashboard drawn with Cairo from Lua, on a Hyprland special
workspace. Replaces UDT's variables-based conky.conf.in.
Platform facts verified before fixing the design, since each one
invalidates a common approach:
- Cairo on Wayland needs conky_surface(). The usual
cairo_xlib_surface_create idiom gets a nil drawable and visual under
out_to_wayland, so every tutorial using it is wrong here.
- own_window_type='normal' makes Conky a real toplevel that a Hyprland
windowrule can place; 'desktop' is a layer-surface and cannot be
assigned to a workspace.
- Cairo output covers conky.text, so conky.text stays empty.
Layout is a table of grid cells at the top of dashboard.lua, so
reordering widgets is one edit and the same table works on both
monitors. The 2560x1600 mockup's vertical stack does not fit the
2560x1080 primary, which is what motivates cells over pixels.
hwmon glob-by-name is carried over from the old config deliberately:
fixed indices drift across kernel reorders and silently read the wrong
chip.
v1 is one clock card end to end. Widgets are additive after that.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|