aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/plans/2026-09-16-conky-lua-dashboard.md
AgeCommit message (Collapse)AuthorFilesLines
2026-09-16fix: draw at monitor size, not a 1200x700 minimumDanilo M.1-2/+10
Hyprland's fullscreen rule resizes the window but not conky's drawing surface, which stays at minimum_width/minimum_height. The dashboard therefore painted its backdrop over roughly the top-left third of the screen and left bare wallpaper beside it, visible as soon as the window rules put it fullscreen on special:dash. Set to the primary monitor, 2560x1080. The grid derives its cells from the surface, so the layout still fills whatever size it is given; only the surface needed to grow. Task 4's development config keeps 1200x700 deliberately: a smaller window is easier to screenshot and compare during that task, and it never runs fullscreen. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16docs: fix the toggle syntax and verify the unusual rule keysDanilo M.1-10/+36
Four defects, all found while running Task 8. The documented toggle command does not work on this machine. Under the Lua config `hyprctl dispatch` evaluates its argument as Lua, so the plain `hyprctl dispatch togglespecialworkspace dash` fails with "')' expected near 'dash'"; Hyprland even says so in its error. The working form is `hyprctl dispatch 'hl.dsp.workspace.toggle_special("dash")'`, verified toggling special:dash on and off. Also read the result from `monitors[0].specialWorkspace.name`, since activeworkspace keeps reporting the ordinary workspace underneath. `fullscreen` and `no_focus` appear in no existing rule, so they were checked against the runtime rather than left as caveats: hl.window_rule rejects an unknown field with "unknown field '<name>'", and neither produces that error, so both are accepted. A deliberate bogus key confirmed the check itself works. hl.mainMod is nil in any section other than keybindings.lua, which declares `local mainMod = "SUPER"` and never exports it. The plan hedged about this; it now states the literal to use. Task 8's class check ran `conky -c ./conky.conf`, which is gitignored generated output and absent on a fresh clone, so it now renders the config first. Its `pkill -f` also matched the running script's own command line and killed the shell's process group, returning 144 and swallowing the log it had just been told to read; `pkill -x conky` instead, fixed in Tasks 4 and 6 too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16test: make the layout assertion actually able to failDanilo M.1-2/+12
The out-of-grid check iterated `G.layout or {}`. With layout unexported that walks an empty table, so the block passed vacuously and the test could never detect the very condition it existed to check. Confirmed by unexporting layout and watching the suite still pass. Drops the fallback and asserts the export first. Verified by mutation: unexporting layout now fails with "dashboard.lua must export layout", and moving the clock to col=5 fails with "layout entry out of columns", so both paths have teeth. The plan's Step 3 expected a failure that could not happen; it now says what the failure looks like and warns that a pass there means the test is broken rather than the code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16fix: step text cursors by advance, not ink widthDanilo M.1-5/+26
The date rendered as "16 /SEP /2026", each slash jammed against the next glyph. measure() returns the ink width, which ignores leading and trailing spaces because a space carries no ink, and clock.lua was using it to advance a cursor. Measured: " / " covers 6px of ink but advances 14px, so every separator lost 8px. Splits the two uses that were conflated in one function. measure() is for centring and right-aligning, where ink width is what you want; advance() returns x_advance and is for laying out runs of text left to right. The clock's date now uses advance() and reads "16 / SEP / 2026" with even gaps, verified by screenshot. Worth the split rather than changing measure() in place: text_right is a correct caller of the ink width, so one function cannot serve both and silently returning the advance would have broken alignment instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16style: drop a duplicated comment line in the templateDanilo M.1-1/+0
An earlier patch left "c8 = 200/255 alpha." on its own line directly above the sentence that already says it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16docs: fix the dev config gap and the removed ARGB settingsDanilo M.1-4/+20
Two defects found while running Task 4, both confirmed against the conky build rather than assumed. Task 4's development config defined color1..color7 and default_color but not default_shade_color, which palette() reads for the card fill, so following the plan verbatim drew every card in the magenta sentinel. The config now carries it, with a note saying why it is required. own_window_argb_visual has been REMOVED in conky 1.24 (ARGB is always on when available) and own_window_argb_value is deprecated; both warn on this build. Replaced with own_window_colour '#AARRGGBB', which emits no warnings. In the template that value follows the palette through a new @BODY_SHADE_RAW@ placeholder, the shade colour without its leading '#', so a scheme switch recolours the window backdrop too rather than pinning it to one hardcoded hex. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16fix: read the palette from the config file, and stop leaking extentsDanilo M.1-13/+51
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>
2026-09-16docs: fix a comment naming a function that does not existDanilo M.1-1/+1
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>
2026-09-16docs: rewrite Task 8 for the Lua Hyprland configDanilo M.1-61/+145
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>
2026-09-16docs: add implementation plan for the Lua dashboardDanilo M.1-0/+1531
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>