docs(backlog): add item 42 — synced system calendar on the clock click
All checks were successful
Check / eval (push) Successful in 3m2s

Bernardo wants clicking the Waybar date module to open a calendar showing
events synced from the user's accounts, opening instantly (not Thunderbird-
slow). Investigated (2026-07-08): recommend the split model — khal (TUI in
a floating, palette-themed ghostty window) + vdirsyncer for CalDAV/Google
sync — over calcurse (local-first, weaker sync) or GNOME Calendar (GUI,
best Google onboarding but not instant). Flags the two design wrinkles:
credentials are the one legit out-of-flake secret, and Google OAuth needs a
self-registered client_id. Placed in NEXT as [big] with slices (a) viewer
+ click wiring, (b) sync + accounts, (c) events-in-tooltip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-07-08 14:56:47 +01:00
parent ce83a8e655
commit 2954283e23

View File

@@ -252,7 +252,54 @@ Next slice: on hardware, run `hyprctl clients` while each is open, read
the real `class`, then append rules. Also revisit whether blueman/s-c-p
actually float once seen (regex tolerance for the `.…-wrapped` form).
### 42. System calendar app synced to the user's accounts `[big]`
(Raised by Bernardo, 2026-07-08.) Clicking the Waybar **date/clock**
module should open a calendar that shows the user's real events, synced
from their calendar accounts (CalDAV / Google / Nextcloud / iCloud). Hard
requirement: it must open **instantly** on click — no Thunderbird/Evolution
multi-second cold start.
_Investigation (2026-07-08 — Bernardo suggested calcurse; asked for the
best approach):_ the winning shape is **split sync from display** — a sync
daemon fills a local store, a fast local viewer reads it instantly.
- **Recommended (most Nomarchy-native): `khal` (TUI) in a floating ghostty
window + `vdirsyncer` for sync.** khal reads a local vdir instantly →
opens immediately; running it in ghostty means it **themes for free** off
the palette (pillar 4, zero new theming surface) and slots into the
float+center windowrule pattern (item 41). vdirsyncer is the de-facto
CalDAV→local-ics sync (Nextcloud/Fastmail/iCloud with an app password are
frictionless). Configs are file-based → in-flake friendly.
- **calcurse (Bernardo's pick):** viable, instant TUI, single self-contained
tool — but it's *local-first*; `calcurse-caldav` multi-account/Google sync
is clunkier than vdirsyncer. Fine if a one-tool solution is preferred over
sync robustness.
- **GNOME Calendar + GNOME Online Accounts:** the GUI path with the *best*
Google onboarding (GOA handles OAuth cleanly), themes via GTK — but it's
heavier and pulls evolution-data-server + GOA, and first-open is **not
instant**, so it fails the core requirement. Fallback only if easy account
setup outweighs instant-open. (`gcalcli` = Google-only, not general.)
_Two real wrinkles to design around:_
1. **Credentials are secrets** — account passwords / OAuth tokens can't live
in the git-tracked flake, so this is the one legitimate exception to
"no state outside the checkout" (see [[in-flake-state-philosophy]]).
Decide: a plain runtime path (`~/.config`, documented exception) vs
sops/agenix encrypted-in-flake.
2. **Google OAuth friction** — vdirsyncer needs a *self-registered*
`client_id`/`client_secret` (shipping one violates Google ToS). CalDAV
app-password providers are painless; Google is the sharp edge. GOA
sidesteps it but only on the heavy GUI path.
_Slices (split before starting):_ (a) `[human]` pick the tool
(recommend khal+vdirsyncer; calcurse acceptable), then ship the viewer
bound to the clock `on-click` — launch it in a ghostty window with a
distinct `--class` so a float+center windowrule can target it; move the
current time↔date `format-alt` toggle to `on-click-right`/scroll; parity
across the four whole-swap jsoncs. Local-only first (an .ics on disk).
(b) add vdirsyncer + a sync systemd timer (like the update checker) + a
menu writer for accounts, resolving the secrets decision above. (c) optional
polish: upcoming events in the clock **tooltip** via a khal-backed script
(hover = next events, click = full calendar).
## LATER