aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2026-09-16docs: fix a comment naming a function that does not existDanilo M.2-2/+2
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-16feat: add stateful CPU percentage counterDanilo M.2-0/+45
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>
2026-09-16feat: add /proc and /sys parsers with fixture testsDanilo M.5-0/+127
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>
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>
2026-09-16docs: settle weather source on OpenWeatherMapDanilo M.2-8/+50
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>
2026-09-16docs: add Lua dashboard design specDanilo M.5-0/+591
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>