aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/gpu.lua
AgeCommit message (Collapse)AuthorFilesLines
5 daysfeat(gpu): show VRAM in use as a bar with a percentageDanilo M.1-7/+33
Sum drm-resident-vram0 from DRM fdinfo, the same per-client counters gputop reads, counting each drm-client-id once since a client repeats its totals on every fd it holds. One grep over /proc/*/fdinfo, about 10ms warm, sampled through new_gate every ~2s. The 12 GiB total is hardcoded: xe exposes no VRAM capacity in sysfs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-18feat: add a title icon to every labelled cardDanilo M.1-3/+3
Add card.ICON and a card.title helper that draws the glyph in the highlight colour before the label, at the label's own size. The eight labelled cards use it, in both the fit_unit width measurement and the draw, so the icon cannot overrun a narrow cell. Clock (no label) and weather (condition glyph already) are unchanged, and the no-data notice titles stay text-only. Codepoints were chosen against a rendered contact sheet, not fontconfig alone, since a wrong codepoint draws a plausible neighbour.
2026-09-17fix: sit the gpu and cache titles level with the big valueDanilo M.1-1/+1
The 'GPU' and 'CACHE' labels shared the big number's baseline, so they read as sitting under it. Move them to the card's top-left, the same title position the other cards use, level with the top of the value.
2026-09-17feat: fluid type for the gpu and cache cardsDanilo M.1-13/+35
The big value moves to the right of the heading, on the same baseline, so the card's width carries it instead of leaving the right half empty. Type now scales to fill the cell: card.fit_unit measures the rows and returns the largest size that fits the width, and the widget takes the smaller of that and its height budget, shrinking only where a row would collide.
2026-09-17fix: stop the widgets from stalling or raising the drawDanilo M.1-2/+2
Memoize hwmon_dir by chip name so sensor reads no longer popen grep on every frame, cache misses included. Floor fractional byte counts in card.human so it cannot raise. Drop the GPU package-temperature row, which duplicated the headline. Set umask before mkdir in both samplers so a fresh cache directory is not world-readable. Make render.lua exit non-zero on a draw error and tolerate an unset HOME.
2026-09-17feat: add the GPU cardDanilo M.1-0/+73