|
Three changes to the calendar card:
The month grid drops further below the header. The weekday initials sat
close enough to read as part of the header rather than as the top of the
grid.
Event rows carry the date before the time, day/month with no year: the
window is a week and the grid above already names the month, so a year
would spend three characters on the one field that cannot vary.
A legend of the calendar colours is pinned along the card's bottom, and
the event rows now end above it rather than at the card's inner edge. It
lists every calendar khal declared a colour for, in name order so it
does not reshuffle between frames, since pairs() walks a hash.
The row budget also counted one row more than the drawing loop would
draw, which suppressed the '+N more' line exactly when it was needed:
the loop cut the row the count had already spent. Both now test the same
condition.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
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>
|