aboutsummaryrefslogtreecommitdiffstats
path: root/bin/calendar-sample.sh
AgeCommit message (Collapse)AuthorFilesLines
10 daysfix(calendar): drop the cache when khal is missingDanilo M.1-0/+8
With khal uninstalled the sampler still wrote a cache with a generated key and no events, because khal's stderr is discarded. The card then read "nothing this week" while an event was scheduled. Removing the cache instead shows the card's "no calendar data" face. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-18feat: add a calendar card reading khalDanilo M.1-0/+76
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>