repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

caldav: today agenda + stale indicator; fix weekday header index, grow popup

0d2174a26dd09b468f1da76f426529650ce8d106

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Task 9: list today's events and tasks below the grid, sorted all-day/
untimed first then by start time, colored dot per item, HH:MM prefix for
timed, ○/✓ for open/done tasks, 'Keine Termine' empty state. Append a
'·' to the date line when caldavService.stale (last fetch failed, showing
cached events).

Fixes: wrap the weekday-header delegate in a plain Item so index/modelData
inject into the NuguText (external component with required props otherwise
drops context props). Grow clock popout budget 260->440 so the 6-week grid
plus agenda is no longer clipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Changed files (2)

quickshell/nuguland/PopoutHost.qml

Modified
293 293 return Ical.buildSegments(caldavEvents || [], gs);
296 + readonly property string todayIso: {
297 + const d = clockCol.localNow;
298 + function p(n) { return (n < 10 ? "0" : "") + n; }
299 + return d.getFullYear() + "-" + p(d.getMonth() + 1) + "-" + p(d.getDate());
301 + // today's events + tasks, sorted: all-day/untimed first, then by start time
302 + readonly property var todayItems: {
303 + const evs = caldavEvents || [];
304 + const out = [];
305 + for (let i = 0; i < evs.length; i++) {
306 + if (Ical.coveredDates(evs[i]).indexOf(todayIso) >= 0)
307 + out.push(evs[i]);
309 + out.sort(function (a, b) {
310 + const ta = (a.allDay || a.startMs == null) ? -1 : a.startMs;
311 + const tb = (b.allDay || b.startMs == null) ? -1 : b.startMs;
312 + return ta - tb;
313 + });
314 + return out;
296 317 spacing: 8
297 318 width: parent ? parent.width : 0
307 328 NuguText {
308 329 theme: root.theme
309 330 variant: "meta"
310 - text: clockCol.state.date ? clockCol.state.date.line : "calendar"
331 + text: (clockCol.state.date ? clockCol.state.date.line : "calendar") + (root.caldavService && root.caldavService.stale ? " ·" : "")
313 334 // single-letter weekday header, Monday-first; weekend dimmed
317 338 Repeater {
318 339 model: ["M", "D", "M", "D", "F", "S", "S"]
320 - NuguText {
341 + Item {
321 342 width: 30
322 - horizontalAlignment: Text.AlignHCenter
323 - theme: root.theme
324 - variant: "meta"
325 - text: modelData
326 - opacity: index >= 5 ? 0.4 : 0.7
343 + height: hdr.height
345 + NuguText {
346 + id: hdr
348 + anchors.horizontalCenter: parent.horizontalCenter
349 + theme: root.theme
350 + variant: "meta"
351 + text: modelData
352 + opacity: index >= 5 ? 0.4 : 0.7
434 - NuguText {
435 - theme: root.theme
436 - text: clockCol.state.agenda && clockCol.state.agenda.length > 0 ? `agenda: ${clockCol.state.agenda[0].title}` : "agenda: clear"
462 + // today's agenda: events + tasks, ○ for open tasks, ✓ for done
463 + Column {
464 + width: parent ? parent.width : 0
465 + spacing: 4
467 + Repeater {
468 + model: clockCol.todayItems
470 + Row {
471 + spacing: 6
473 + Rectangle {
474 + anchors.verticalCenter: parent.verticalCenter
475 + width: 6
476 + height: 6
477 + radius: 3
478 + color: modelData.color
481 + NuguText {
482 + theme: root.theme
483 + variant: "body"
484 + text: {
485 + const ev = modelData;
486 + const mark = ev.kind === "task" ? (ev.done ? "✓ " : "○ ") : "";
487 + let t = "";
488 + if (!ev.allDay && ev.startMs != null) {
489 + const d = new Date(ev.startMs);
490 + const p = function (n) { return (n < 10 ? "0" : "") + n; };
491 + t = p(d.getHours()) + ":" + p(d.getMinutes()) + " ";
493 + return t + mark + (ev.summary || "(ohne Titel)");
501 + NuguText {
502 + visible: clockCol.todayItems.length === 0
503 + theme: root.theme
504 + variant: "meta"
505 + text: "Keine Termine"

quickshell/nuguland/SurfaceManager.qml

Modified
67 67 case "clock":
68 68 return {
69 69 "width": width,
70 - "height": heightBudget(260)
70 + "height": heightBudget(440)
72 72 case "system":
73 73 return {