repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

caldav: modern centered calendar — big square day cells

c7993269f96c5f27668e94eee8e0ea9abc2b82bd

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Replace the full-width stretched grid with a centered block of 48px square
cells (modern calendar look). Center the title, date and weekday header.
Bigger day numbers (body variant), larger today circle (34), markers and
bands rescaled and re-laid for the taller cells; band pitch already derives
from cell size. Agenda centered under the grid at the grid width. Grow the
clock popout to 580 to fit the taller grid plus full agenda.

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

Changed files (2)

quickshell/nuguland/PopoutHost.qml

Modified
268 268 readonly property bool setupMode: root.caldavService && root.caldavService.status === "needs-setup"
270 - // grid sizing: cells stretch to fill the full popout width
271 - readonly property int gridSpacing: 4
272 - readonly property real cellW: (width - gridSpacing * 6) / 7
273 - readonly property int cellH: 36
270 + // grid sizing: big square day cells, grid centered in the popout
271 + readonly property int gridSpacing: 6
272 + readonly property int cellW: 48
273 + readonly property int cellH: 48
274 274 readonly property real pitchX: cellW + gridSpacing
275 275 readonly property real pitchY: cellH + gridSpacing
276 + readonly property real gridW: cellW * 7 + gridSpacing * 6
277 278 // iso "YYYY-MM-DD" -> array of single-day markers {color, allDay}.
278 279 // Multi-day events (coveredDates>1) are drawn as bands, not markers.
332 333 Component.onCompleted: if (root.caldavService) root.caldavService.refresh()
334 335 NuguText {
336 + width: parent ? parent.width : 0
337 + horizontalAlignment: Text.AlignHCenter
335 338 theme: root.theme
336 339 variant: "title"
337 340 text: clockCol.state.clock ? clockCol.state.clock.statusDisplay : "--:--:--"
340 343 NuguText {
344 + width: parent ? parent.width : 0
345 + horizontalAlignment: Text.AlignHCenter
341 346 theme: root.theme
342 347 variant: "meta"
343 348 text: (clockCol.state.date ? clockCol.state.date.line : "calendar") + (root.caldavService && root.caldavService.stale ? " ·" : "")
346 - // single-letter weekday header, Monday-first; weekend dimmed
347 - Row {
351 + // centered calendar block: weekday header + month grid + bands
352 + Item {
348 353 visible: !clockCol.setupMode
349 - spacing: clockCol.gridSpacing
354 + width: parent ? parent.width : 0
355 + height: calStack.height
351 - Repeater {
352 - model: ["M", "D", "M", "D", "F", "S", "S"]
357 + Column {
358 + id: calStack
354 - Item {
355 - width: clockCol.cellW
356 - height: hdr.height
360 + anchors.horizontalCenter: parent.horizontalCenter
361 + spacing: clockCol.gridSpacing
358 - NuguText {
359 - id: hdr
363 + // single-letter weekday header, Monday-first; weekend dimmed
364 + Row {
365 + spacing: clockCol.gridSpacing
367 + Repeater {
368 + model: ["M", "D", "M", "D", "F", "S", "S"]
370 + Item {
371 + width: clockCol.cellW
372 + height: hdr.height
374 + NuguText {
375 + id: hdr
377 + anchors.horizontalCenter: parent.horizontalCenter
378 + theme: root.theme
379 + variant: "meta"
380 + text: modelData
381 + opacity: index >= 5 ? 0.4 : 0.7
361 - anchors.horizontalCenter: parent.horizontalCenter
362 - theme: root.theme
363 - variant: "meta"
364 - text: modelData
365 - opacity: index >= 5 ? 0.4 : 0.7
374 - Item {
375 - visible: !clockCol.setupMode
376 - width: monthGrid.width
377 - height: monthGrid.height
390 + Item {
391 + width: monthGrid.width
392 + height: monthGrid.height
379 394 Grid {
380 395 id: monthGrid
398 413 Rectangle {
399 414 visible: !!modelData.today
400 415 anchors.horizontalCenter: parent.horizontalCenter
401 - y: (parent.height - height) / 2 - 4
402 - width: 26
403 - height: 26
404 - radius: 13
416 + anchors.verticalCenter: parent.verticalCenter
417 + anchors.verticalCenterOffset: -5
418 + width: 34
419 + height: 34
420 + radius: 17
405 421 color: root.theme ? root.theme.ui.accent : "transparent"
408 424 NuguText {
409 425 anchors.horizontalCenter: parent.horizontalCenter
410 - y: (parent.height - height) / 2 - 4
426 + anchors.verticalCenter: parent.verticalCenter
427 + anchors.verticalCenterOffset: -5
411 428 theme: root.theme
412 - variant: "meta"
429 + variant: "body"
413 430 text: modelData.day ? String(modelData.day) : ""
414 431 color: modelData.today && root.theme ? root.theme.content.backdrop : (root.theme ? root.theme.content.normal : "white")
415 432 opacity: modelData.inMonth ? 1 : 0.3
420 437 anchors.horizontalCenter: parent.horizontalCenter
421 438 anchors.bottom: parent.bottom
422 - anchors.bottomMargin: 2
423 - spacing: 2
439 + anchors.bottomMargin: 7
440 + spacing: 3
425 442 Repeater {
426 443 model: Math.min(cell.markers.length, 3)
459 476 readonly property var seg: modelData
461 478 x: seg.colStart * clockCol.pitchX
462 - y: seg.row * clockCol.pitchY + clockCol.cellH - 9 - seg.lane * 7
479 + y: seg.row * clockCol.pitchY + clockCol.cellH - 17 - seg.lane * 9
463 480 width: (seg.colEnd - seg.colStart + 1) * clockCol.pitchX - clockCol.gridSpacing
464 - height: 5
481 + height: 6
465 482 color: Qt.alpha(seg.color, 0.9)
466 - topLeftRadius: seg.roundLeft ? 2.5 : 0
467 - bottomLeftRadius: seg.roundLeft ? 2.5 : 0
468 - topRightRadius: seg.roundRight ? 2.5 : 0
469 - bottomRightRadius: seg.roundRight ? 2.5 : 0
483 + topLeftRadius: seg.roundLeft ? 3 : 0
484 + bottomLeftRadius: seg.roundLeft ? 3 : 0
485 + topRightRadius: seg.roundRight ? 3 : 0
486 + bottomRightRadius: seg.roundRight ? 3 : 0
478 - // today's agenda: events + tasks, ○ for open tasks, ✓ for done
479 - Column {
499 + // today's agenda: events + tasks, ○ for open tasks, ✓ for done; centered
500 + Item {
480 501 visible: !clockCol.setupMode
481 502 width: parent ? parent.width : 0
482 - spacing: 4
503 + height: agendaCol.height
505 + Column {
506 + id: agendaCol
508 + anchors.horizontalCenter: parent.horizontalCenter
509 + width: clockCol.gridW
510 + spacing: 4
484 512 Repeater {
485 513 model: clockCol.todayItems
522 550 text: "Keine Termine"
527 557 // setup form: shown when the service has no usable config yet.

quickshell/nuguland/SurfaceManager.qml

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