diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 12:40:13 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 12:40:13 +0200 |
| commit | adecc8de0e90b3856c8807e1c3610c70879545ad (patch) | |
| tree | a530c9e19a7b03b73f0526c9e62cf00ba17e607e | |
| parent | 32e10b1d6962afd04a209f300ebb8ab9ee29f070 (diff) | |
| download | conky-theme-udt-adecc8de0e90b3856c8807e1c3610c70879545ad.tar.gz conky-theme-udt-adecc8de0e90b3856c8807e1c3610c70879545ad.zip | |
docs: correct the system-widget comments and defer the age marker
Fix the conky.conf.in comment to name all three samplers and the README
to say the cache sampler runs every 15 minutes. Rewrite the disks layout
comment to match per_row = n (no wrapping), drop the stale "seventeenth
bar" note, and record in the spec that the cache age marker is
deliberately deferred with the epoch-line upgrade path.
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | conky.conf.in | 5 | ||||
| -rw-r--r-- | docs/superpowers/specs/2026-09-17-system-widgets-design.md | 12 | ||||
| -rw-r--r-- | test/test_data.lua | 2 | ||||
| -rw-r--r-- | widgets/disks.lua | 7 |
5 files changed, 21 insertions, 7 deletions
@@ -83,7 +83,7 @@ three `${execi}` entries, even though that block renders nothing under Cairo. ${execi 60 ~/.config/conky/bin/disks-sample.sh} ${execi 900 ~/.config/conky/bin/cache-sample.sh} -The disks sampler runs once a minute; the cache one every 15, because `du -sh +The disks sampler runs once a minute; the cache one every 15 minutes, because `du -sh ~/.cache` walks the tree and takes about 100ms warm, which is fine on a slow cycle and unthinkable on the 2-second draw. Tying them to conky means nothing samples while the dashboard is down. diff --git a/conky.conf.in b/conky.conf.in index 073fd80..cc03a28 100644 --- a/conky.conf.in +++ b/conky.conf.in @@ -49,6 +49,7 @@ conky.config = { -- Cairo output covers conky.text, so nothing here is visible. The execi still -- fires on schedule: verified with a probe config whose only text was an execi --- producing no output. This is what refreshes the weather cache, and tying it --- to conky means nothing fetches while the dashboard is down. +-- producing no output. This is what runs the weather, disks and cache +-- samplers, and tying it to conky means nothing fetches while the dashboard is +-- down. conky.text = [[${execi 900 ~/.config/conky/bin/weather-fetch.sh}${execi 60 ~/.config/conky/bin/disks-sample.sh}${execi 900 ~/.config/conky/bin/cache-sample.sh}]] diff --git a/docs/superpowers/specs/2026-09-17-system-widgets-design.md b/docs/superpowers/specs/2026-09-17-system-widgets-design.md index 9fee4a5..cd24ee0 100644 --- a/docs/superpowers/specs/2026-09-17-system-widgets-design.md +++ b/docs/superpowers/specs/2026-09-17-system-widgets-design.md @@ -239,6 +239,18 @@ crashed widget. beside the heading, so an unreachable NFS server or a dead sampler is visible rather than silently showing yesterday's numbers. +> **Implementation note (deferred): the age marker is not drawn.** The +> requirement above is deliberately unimplemented in this wave. The cache +> formats and their parser fixtures are fixed by the plan, and the widgets +> already implement the absent-file case (`no cache data` plus the sampler +> name). Adding the marker means either embedding an epoch timestamp in each +> cache file, which would disturb every fixture and the two parsers, or +> stamping the file's mtime, which conky's Lua cannot stat: `lfs` is not +> available in the environment. The accepted path when it is picked up is an +> extra epoch line that the parser learns to skip, leaving the existing fields +> and fixtures untouched; the widget then compares it against the sampling +> interval and draws a dim age marker beside the heading. + ## Tests `test/test_data.lua` extends with fixtures under `test/fixtures/`: diff --git a/test/test_data.lua b/test/test_data.lua index 71baef0..a90413b 100644 --- a/test/test_data.lua +++ b/test/test_data.lua @@ -70,7 +70,7 @@ assert(cores[1].idle == 1058428, 'core 0 idle, got ' .. tostring(cores[1].idle)) assert(cores[2].total == 1066406, 'core 1 total, got ' .. tostring(cores[2].total)) -- The aggregate 'cpu ' line must NOT be counted as a core: it would draw a --- seventeenth bar showing the average, which looks like a real core. +-- bar for the aggregate line showing the average, which looks like a real core. for i, c in ipairs(cores) do assert(c.total < 2000000, 'entry ' .. i .. ' looks like the aggregate line') end diff --git a/widgets/disks.lua b/widgets/disks.lua index aff3e5b..c5fec1e 100644 --- a/widgets/disks.lua +++ b/widgets/disks.lua @@ -60,9 +60,10 @@ function M.draw(cr, rect, colors) local top = inner.y + label_size * 2.2 local avail_h = (inner.y + inner.h) - top - -- Lay the rings out in a row, wrapping if the card is narrow. Below the - -- radius where a ring reads, fall back to labelled bars rather than drawing - -- a row of illegible dots. + -- All rings share one row: the cell width shrinks as mounts are added and + -- the ring radius follows it, so the layout never wraps. Below the radius + -- where a ring reads, fall back to labelled bars rather than drawing a row + -- of illegible dots. local n = #fs local per_row = n local cell_w = inner.w / per_row |
