diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 4000d18..232f819 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -1872,86 +1872,109 @@ in NumberAnimation { duration: 150; easing.type: Easing.OutCubic } } - Text { + Rectangle { + width: 7 * 32 + 16 + height: calTitle.height + 16 + radius: 8 + color: Theme.base01 anchors.horizontalCenter: parent.horizontalCenter - text: clockText.now.toLocaleDateString(Qt.locale(), "dddd, d MMMM yyyy") - color: Theme.base05 - font.family: "FiraMono Nerd Font" - font.pixelSize: 14 - font.weight: Font.Medium - } - Row { - spacing: 0 - Repeater { - model: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"] - Text { - required property var modelData - width: 28 - horizontalAlignment: Text.AlignHCenter - text: modelData - color: Theme.base03 - font.family: "FiraMono Nerd Font" - font.pixelSize: 11 - } + Text { + id: calTitle + anchors.centerIn: parent + text: clockText.now.toLocaleDateString(Qt.locale(), "dddd, d MMMM yyyy") + color: Theme.base05 + font.family: "FiraMono Nerd Font" + font.pixelSize: 16 + font.weight: Font.Medium } } - Grid { - columns: 7 - spacing: 0 + Rectangle { + width: 7 * 32 + 16 + height: calInner.height + 16 + radius: 8 + color: Theme.base01 + anchors.horizontalCenter: parent.horizontalCenter - Repeater { - id: calRepeater - model: 42 + Column { + id: calInner + anchors.centerIn: parent + spacing: 4 - Rectangle { - required property int index - width: 28 - height: 24 - radius: 4 - color: { - let d = clockText.now; - let first = new Date(d.getFullYear(), d.getMonth(), 1); - let startDay = (first.getDay() + 6) % 7; - let dayNum = index - startDay + 1; - let daysInMonth = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate(); - return (dayNum === d.getDate() && dayNum >= 1 && dayNum <= daysInMonth) - ? Theme.base02 : "transparent"; + Row { + spacing: 0 + Repeater { + model: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"] + Text { + required property var modelData + width: 32 + horizontalAlignment: Text.AlignHCenter + text: modelData + color: Theme.base03 + font.family: "FiraMono Nerd Font" + font.pixelSize: 13 + } } + } - Text { - anchors.centerIn: parent - text: { - let d = clockText.now; - let first = new Date(d.getFullYear(), d.getMonth(), 1); - let startDay = (first.getDay() + 6) % 7; - let dayNum = parent.index - startDay + 1; - let daysInMonth = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate(); - return (dayNum >= 1 && dayNum <= daysInMonth) ? dayNum.toString() : ""; + Grid { + columns: 7 + spacing: 0 + + Repeater { + id: calRepeater + model: 42 + + Rectangle { + required property int index + width: 32 + height: 26 + radius: 4 + color: { + let d = clockText.now; + let first = new Date(d.getFullYear(), d.getMonth(), 1); + let startDay = (first.getDay() + 6) % 7; + let dayNum = index - startDay + 1; + let daysInMonth = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate(); + return (dayNum === d.getDate() && dayNum >= 1 && dayNum <= daysInMonth) + ? Theme.base02 : "transparent"; + } + + Text { + anchors.centerIn: parent + text: { + let d = clockText.now; + let first = new Date(d.getFullYear(), d.getMonth(), 1); + let startDay = (first.getDay() + 6) % 7; + let dayNum = parent.index - startDay + 1; + let daysInMonth = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate(); + return (dayNum >= 1 && dayNum <= daysInMonth) ? dayNum.toString() : ""; + } + color: { + let d = clockText.now; + let first = new Date(d.getFullYear(), d.getMonth(), 1); + let startDay = (first.getDay() + 6) % 7; + let dayNum = parent.index - startDay + 1; + return (dayNum === d.getDate()) ? Theme.base05 : Theme.base04; + } + font.family: "FiraMono Nerd Font" + font.pixelSize: 13 + } } - color: { - let d = clockText.now; - let first = new Date(d.getFullYear(), d.getMonth(), 1); - let startDay = (first.getDay() + 6) % 7; - let dayNum = parent.index - startDay + 1; - return (dayNum === d.getDate()) ? Theme.base05 : Theme.base04; - } - font.family: "FiraMono Nerd Font" - font.pixelSize: 11 } } } } Rectangle { - width: 7 * 28 + width: 7 * 32 + 16 height: 1 color: Theme.base02 } Row { - width: 7 * 28 + width: 7 * 32 + 16 Text { text: "Notifications" color: Theme.base05 @@ -1981,7 +2004,7 @@ in Column { spacing: 4 - width: 7 * 28 + width: 7 * 32 + 16 Text { visible: bar.notifServer.trackedNotifications.values.length === 0 @@ -1998,7 +2021,7 @@ in Rectangle { id: notifItem required property var modelData - width: 7 * 28 + width: 7 * 32 + 16 height: notifCol.height + 12 radius: 6 color: Theme.base01