dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Reviews Threads Compare Notes Search Review guide CI runs caldav: clock calendar grid with weekday header, today circle, event markers 806066c1ad0e434720d3262423c3604f4d063b06
Oliver Jan Krylow <oliver@bugabinga.net > · 28 Jun 2026
unsigned
Browse files Compare with HEAD
Rewrite clockContent grid (Task 7): single-letter Monday-first weekday
header (weekend dimmed), today as filled accent circle with contrast
number, out-of-month dimmed. Per-day marker strip keyed off the cell's
iso date: all-day events as wide pills, timed events/tasks as dots, max
3 then a gray overflow bar. eventsByDate derives from caldavService.events
via Ical.coveredDates; single-day only (multi-day handled by bands next).
Refresh-on-open via Component.onCompleted. Replaces fragile parent.parent
chains with clockCol id refs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Changed files (1) Diff layout Auto Unified Split
quickshell/nuguland/PopoutHost.qml Modified +92 / −13 text lines
2 2 import Quickshellimport Quickshell3 3 import Quickshell.Waylandimport Quickshell.Wayland4 4 import "Util.js" as Util import "Util.js" as Util
5 + import "caldav.js" as Ical 6 7 PanelWindow {PanelWindow {251 252 id : clockContent id : clockContent 254 257 property var state: root . timeService ? Util. parseJson(root . timeService. stateJson(), { property var state: root . timeService ? Util. parseJson(root . timeService. stateJson(), {263 266 property var days: calendar. weeks ? []. concat. apply ([], calendar. weeks) : [] property var days: calendar. weeks ? []. concat. apply ([], calendar. weeks) : []
270 + readonly property var caldavEvents: root. caldavService ? root. caldavService. events : []271 + readonly property var eventsByDate: {273 + const evs = caldavEvents || [];274 + for (let i = 0 ; i < evs. length; i++ ) {276 + const dates = Ical. coveredDates(ev);277 + if (dates. length !== 1 )279 + const iso = dates[0 ];280 + (map[iso] || (map[iso] = [])). push({282 + "allDay" : ev. allDay || ev. kind === "task" 265 288 spacing: 8 spacing: 8 266 289 width: parent ? parent. width : 0 width: parent ? parent. width : 0
291 + Component . onCompleted : if (root . caldavService) root. caldavService. refresh ()268 293 NuguText { NuguText {269 294 theme: root . theme theme: root . theme270 295 variant: "title" variant: "title" 271 - text: parent . state. clock ? parent . state. clock. statusDisplay : "--:--:--" 296 + text: clockCol . state. clock ? clockCol . state. clock. statusDisplay : "--:--:--" 274 299 NuguText { NuguText {275 300 theme: root . theme theme: root . theme276 301 variant: "meta" variant: "meta" 277 - text: parent. state. date ? parent. state. date. line : "calendar" 302 + text: clockCol. state. date ? clockCol. state. date. line : "calendar" 310 + model: ["M" , "D" , "M" , "D" , "F" , "S" , "S" ]314 + horizontalAlignment: Text. AlignHCenter318 + opacity: index >= 5 ? 0.4 : 0.7 283 328 spacing: 2 spacing: 2 285 330 Repeater { Repeater {286 - model: parent. parent. days331 + model: clockCol. days292 - color: modelData. selected && root . theme ? root . theme. ui. focus : "transparent" 294 - border. color: root . theme ? root . theme. ui. accent : "transparent" 336 + readonly property var markers: clockCol. eventsByDate[modelData. iso] || []343 + visible: !! modelData. today344 + anchors. centerIn: parent348 + color: root . theme ? root . theme. ui. accent : "transparent" 296 351 NuguText { NuguText {297 352 anchors. centerIn: parent anchors. centerIn: parent298 353 theme: root . theme theme: root . theme299 354 variant: "meta" variant: "meta" 300 - selected: !! modelData. selected
301 355 text: modelData. day ? String (modelData. day) : "" text: modelData. day ? String (modelData. day) : "" 302 - opacity: modelData. inMonth ? 1 : 0.35 356 + color: modelData. today && root . theme ? root . theme. content. backdrop : (root . theme ? root . theme. content. normal : "white" )357 + opacity: modelData. inMonth ? 1 : 0.3 362 + anchors. horizontalCenter: parent. horizontalCenter363 + anchors. bottom: parent. bottom364 + anchors. bottomMargin: 2 368 + model: Math . min(cell. markers. length, 3 )371 + readonly property var m: cell. markers[index]372 + readonly property bool overflow: index === 2 && cell. markers. length > 3 374 + width: overflow ? 5 : (m. allDay ? 8 : 4 )377 + color: overflow ? (root . theme ? root . theme. content. minor : "gray" ) : m. color311 390 NuguText { NuguText {312 391 theme: root . theme theme: root . theme313 - text: parent . state. agenda && parent . state. agenda. length > 0 ? ` agenda: ${ parent . state. agenda[0 ]. title}` : "agenda: clear" 392 + text: clockCol . state. agenda && clockCol . state. agenda. length > 0 ? ` agenda: ${ clockCol . state. agenda[0 ]. title}` : "agenda: clear"