| Age | Commit message (Collapse) | Author | Files | Lines |
|
A centred card showing today's "N years ago" photos from Immich, one at
a time on a 30-second rotation, with when each was taken and where.
bin/immich-fetch.sh runs from conky's execi every 30 minutes: it asks
/api/memories for today, converts each preview to PNG (Cairo loads
nothing else) and writes an index with the year, local capture time and
place. The place needs the key's asset.read permission and reads '--'
without it. The key lives in ~/.config/udt/immich.env, like the weather
key, because a GPG-backed store would raise a pinentry unattended.
The dashboard now registers lua_mouse_hook and hands pointer events to
the widget under the pointer. On this card, scrolling steps through the
photos and a left click opens the photo in Immich's web UI and hides the
dashboard so the browser is not stuck beneath it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Replaces the Waybar module that used to show breaktimer.sh with a card
on the dashboard. The card's big value is the phase countdown, coloured
by phase with the same language the Waybar module used, and two rows
name the phase and what the countdown leads to.
Data comes from bin/breaktimer-sample.sh, run by conky at execi 5, which
reads the daemon's runtime files into a cache. The sampler owns the
kill -0 liveness check, because conky's Lua cannot run a process and a
dead daemon must read as 'fermo' rather than a stale 'running'.
Drops outside the work-hours window freeze the countdown while the phase
stays 'working'. The sampler detects this from the remain file's age and
the card reads it as 'outside working hours', which also covers a hung
daemon. The phase words and colour roles live in data.breaktimer_parse
so they are unit-tested; the card only draws the result.
|
|
The month grid with the week's appointments below it, colour-coded by
calendar. Events come from a cache file rather than a live call: khal
costs about 200ms of Python startup, which is two orders of magnitude
over the 2-second draw budget, so bin/calendar-sample.sh writes the
cache on a 5-minute execi and the widget only parses.
Calendar colours are read out of khal's own config by the sampler and
mapped onto the board's palette roles, so the card follows a scheme
change instead of pinning three literal hues.
khal will not emit an ISO date: {start-date} uses the user's dateformat,
which carries no year here, and a strftime spec inside the field raises.
The sampler asks for {start-date-long} and data.calendar_date recovers
the numbers by position, resolving day/month by magnitude and reading a
genuinely ambiguous pair day-first. A 2-digit year is refused rather
than guessed at.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Two lines on one chart against a shared ceiling, one sample per pixel column
so nothing is interpolated. The history is module state sized from the card's
width, so moving the card reframes the window rather than clearing it.
The public address is refused once stale: an address that may no longer be
yours, displayed with confidence, is worse than a dash.
The fixture uses TEST-NET-1. This repository is public.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Free space is read rather than derived: size - used overstates it by the
root-reserved blocks, tens of gigabytes on a large filesystem, none of it
available to anyone but root.
Also asserts fs[3], the row whose device name ends in a digit. It sits next
to a numeric column and is the row most likely to break a parser counting
fields, and nothing covered it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
The pattern required a literal CPU token immediately before the @, which the
one Intel fixture happens to carry. A Xeon reads 'E5-2680 v4 @ 2.40GHz' and a
Tiger Lake 'i7-1165G7 @ 2.80GHz', so both kept their clock on the card.
A generation prefix hid the vendor word from its anchor for the same reason:
'11th Gen Intel Core i7-1165G7' kept 'Intel'.
Three more forms added as tests. The Intel fixture was meant to keep the
stripping a rule, and one fixture was not enough to do it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Stripping by rule rather than by a table of known parts: a leading vendor
word, trademark noise, a trailing core count or clock. The Intel fixture
exists to keep it a rule.
DMI placeholders read as no board at all. 'To Be Filled By O.E.M.' on the
dashboard is worse than a blank row.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Only the first space separates, so a value keeps its own spaces. Values stay
strings: the sampler writes epochs and the widget decides whether an age
reads as hours or days.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
The widget passes conky's update_interval rather than letting it default, so
the argument path is the one that ships and nothing exercised it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Mirrors new_cpu_counter: cumulative counters need two samples to yield a
rate, and each direction carries its own previous reading.
Clamps a negative delta to zero rather than letting a 32-bit wrap or an
interface reset produce a spike. One bogus sample sets the shared autoscale
and flattens the entire window.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
A ring left its line width behind, so the next stroke on the card inherited
a hairline several pixels thick. It already restored the cap for the same
reason.
card.truncate replaces byte slicing, which cuts a multi-byte character in
half and emits an invalid sequence Cairo draws as a box.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
is_stale and age_str were the only functions in the module doing
arithmetic on an unchecked argument: a nil `now` raised, and a raise in
this project is a blank dashboard with no message. Every caller passes
os.time(), which cannot be nil, so this was unreachable, but it is the
same bug already fixed once in icon() and the module header promises
nothing raises.
age_str also printed a negative age when the observation timestamp was
in the future, which a clock skew can produce. "stale -17m" on the card
reads as a broken widget, so the age now floors at zero and such a
reading counts as fresh: weather from the future is not old.
With this the whole module is raise-free, verified across every function
against nil, string, table, boolean, NaN, negative and zero arguments in
all three positions.
Both cases were found by the Task 5 implementer, which was asked to
probe beyond its given tests and reported them without changing the code.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
The numeric patterns stopped at the 'e', so a temp of 1.8e1 parsed as
1.8 and the card would have drawn 2 degrees instead of 18. Wrong in the
worst way available: silently, and still looking like weather.
OWM has not been seen to emit exponent form, and sampling several cities
near and below zero returned plain decimals throughout, so this was not
reachable in practice. Fixed regardless, because two characters in a
character class is cheaper than the reasoning required to be sure it
stays unreachable, and unlike the NaN case noted in sun_t this one fails
invisibly rather than leaving a mark.
Tests now cover both a negative temperature, which is ordinary here for
half the year, and the exponent form. Reverting the pattern fails them.
Found by adversarial probing of the committed parser, not by the plan's
own tests, which only exercise the fixture.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Lua patterns instead of a JSON library: the current-weather response
is flat and known, so six scalars do not justify a dependency. Every
failure path (truncated write, empty file, garbage, an API error body,
nil input) returns nil rather than raising, since a Lua error here is
a blank dashboard.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
icon(800, nil, 1500, 1900) compared nil against a number and raised,
which in this project is a blank dashboard with no message. The module's
own header promises nothing raises, and is_day() already guards the same
case, so the inconsistency was the bug.
Not reachable from the widget as written: it passes os.time(), and
parse() refuses a response without sunrise and sunset, so no caller can
currently produce the failing combination. Fixed anyway, because the
contract is what future callers will rely on and the fix is one word.
The test file also now says why the codepoint VALUES carry no assertion:
comparing M.ICON.snow against a literal would only prove the escape was
typed twice. Whether E31A draws a snow cloud is what the glyph sheet is
for, and mutation testing confirms the assertions cannot see it.
Found by code review. The same fix is applied to the plan, so Tasks 2-5
inherit the guarded version.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
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>
|
|
The grid's justification is that one layout table works on differently
shaped screens, so assert it: every cell lands inside the margins at
2560x1080 and 1920x1080, a spanning cell absorbs the gap it covers, and
no shipped layout entry falls outside the declared grid.
dashboard.lua exports its internals for this; cairo and lib.card are
stubbed via package.preload since they only exist inside Conky.
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>
|