From a8e1f3ef4ccd4bda401b12a0fe4f3d40e7dab952 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Fri, 3 Oct 2025 19:19:21 +0300 Subject: [PATCH 001/125] added simpler cookie clock style --- .../ii/modules/background/Background.qml | 2 +- .../ii/modules/background/CookieClock.qml | 15 +++++++++++---- .config/quickshell/ii/modules/common/Config.qml | 3 ++- .../ii/modules/settings/InterfaceConfig.qml | 17 +++++++++++++++++ 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index 28f8028de..eca001d2a 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -332,7 +332,7 @@ Variants { Loader { id: cookieClockLoader - visible: root.clockStyle === "cookie" + visible: root.clockStyle === "cookie" || root.clockStyle === "simpler-cookie" active: visible sourceComponent: CookieClock {} } diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 0e1474543..ce9c5c31a 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -13,11 +13,13 @@ import Qt5Compat.GraphicalEffects Item { id: root + readonly property string clockStyle: Config.options.background.clock.style + property real implicitSize: 230 property real hourHandLength: 72 - property real hourHandWidth: 16 + property real hourHandWidth: 20 property real minuteHandLength: 95 - property real minuteHandWidth: 8 + property real minuteHandWidth: clockStyle === "simpler-cookie" ? hourHandWidth : 12 property real centerDotSize: 10 property real hourDotSize: minuteHandWidth @@ -31,6 +33,7 @@ Item { readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 readonly property int clockMinute: parseInt(clockNumbers[1]) + implicitWidth: implicitSize implicitHeight: implicitSize @@ -50,15 +53,17 @@ Item { z: 0 implicitSize: root.implicitSize amplitude: implicitSize / 70 - sides: 12 + sides: Config.options.background.clock.clockSides color: root.colBackground // 12 dots around the cookie Repeater { + model: 12 Item { + visible: clockStyle === "simpler-cookie" ? false : true required property int index - rotation: 360 / 12 * index + rotation: 360 / 12 * index anchors.fill: parent Rectangle { anchors { @@ -81,6 +86,7 @@ Item { z: 1 anchors.centerIn: cookie spacing: -16 + visible: false // LOOK // Numbers Repeater { @@ -132,6 +138,7 @@ Item { // Center dot Rectangle { + visible: clockStyle === "simpler-cookie" ? false : true z: 4 color: root.colOnHourHand anchors.centerIn: parent diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index ea99949d5..93c6c3430 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -127,8 +127,9 @@ Singleton { property real x: -500 property real y: -500 property bool show: true - property string style: "cookie" // Options: "cookie", "digital" + property string style: "cookie" // Options: "cookie", "digital", "simpler-cookie" property real scale: 1 + property int clockSides: 12 } property string wallpaperPath: "" property string thumbnailPath: "" diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 76bd43b93..060cc3fac 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -20,6 +20,7 @@ ContentPage { } } + ConfigSpinBox { text: Translation.tr("Scale (%)") value: Config.options.background.clock.scale * 100 @@ -31,6 +32,17 @@ ContentPage { } } + ConfigSpinBox { + text: Translation.tr("Clock sides") + value: Config.options.background.clock.clockSides + from: 1 + to: 36 + stepSize: 1 + onValueChanged: { + Config.options.background.clock.clockSides = value; + } + } + ContentSubsection { title: Translation.tr("Clock style") ConfigSelectionArray { @@ -49,6 +61,11 @@ ContentPage { icon: "cookie", value: "cookie" }, + { + displayName: Translation.tr("Material simpler cookie"), + icon: "cookie", + value: "simpler-cookie" + }, ] } } From 43f1d5c53e8c305a9201a2f03da1b23595c417d6 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Fri, 3 Oct 2025 22:38:20 +0300 Subject: [PATCH 002/125] finalize simpler cookie clock --- .config/quickshell/ii/modules/background/CookieClock.qml | 5 ++--- .config/quickshell/ii/modules/settings/InterfaceConfig.qml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index ce9c5c31a..db3f44d62 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -27,7 +27,7 @@ Item { property color colBackground: Appearance.colors.colSecondaryContainer property color colOnBackground: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.5) property color colHourHand: Appearance.colors.colPrimary - property color colMinuteHand: Appearance.colors.colSecondary + property color colMinuteHand: Appearance.colors.colSecondaryActive property color colOnHourHand: Appearance.colors.colOnPrimary readonly property list clockNumbers: DateTime.time.split(/[: ]/) @@ -58,7 +58,6 @@ Item { // 12 dots around the cookie Repeater { - model: 12 Item { visible: clockStyle === "simpler-cookie" ? false : true @@ -86,7 +85,7 @@ Item { z: 1 anchors.centerIn: cookie spacing: -16 - visible: false // LOOK + visible: clockStyle === "simpler-cookie" ? false : true // Numbers Repeater { diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 060cc3fac..5540ebfee 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -63,7 +63,7 @@ ContentPage { }, { displayName: Translation.tr("Material simpler cookie"), - icon: "cookie", + icon: "circle", value: "simpler-cookie" }, ] From 239960016914efff1167f64b922c99f4530b7e18 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 01:09:25 +0300 Subject: [PATCH 003/125] minimize settings --- .../ii/modules/settings/InterfaceConfig.qml | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 5540ebfee..1c4ae0468 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -20,26 +20,27 @@ ContentPage { } } - - ConfigSpinBox { - text: Translation.tr("Scale (%)") - value: Config.options.background.clock.scale * 100 - from: 1 - to: 200 - stepSize: 2 - onValueChanged: { - Config.options.background.clock.scale = value / 100; + ConfigRow{ + ConfigSpinBox { + text: Translation.tr("Scale (%)") + value: Config.options.background.clock.scale * 100 + from: 1 + to: 200 + stepSize: 2 + onValueChanged: { + Config.options.background.clock.scale = value / 100; + } } - } - ConfigSpinBox { - text: Translation.tr("Clock sides") - value: Config.options.background.clock.clockSides - from: 1 - to: 36 - stepSize: 1 - onValueChanged: { - Config.options.background.clock.clockSides = value; + ConfigSpinBox { + text: Translation.tr("Clock sides") + value: Config.options.background.clock.clockSides + from: 1 + to: 36 + stepSize: 1 + onValueChanged: { + Config.options.background.clock.clockSides = value; + } } } From 26b9d8193cea178b09bb4f6b6990ac5155330e21 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 13:47:40 +0300 Subject: [PATCH 004/125] add settings for clock, add quote for cookie clock, make quote editable from settings --- .../ii/modules/background/Background.qml | 7 +- .../ii/modules/background/CookieClock.qml | 63 +++++++++++++++-- .../quickshell/ii/modules/common/Config.qml | 9 ++- .../ii/modules/settings/InterfaceConfig.qml | 69 +++++++++++++++---- 4 files changed, 126 insertions(+), 22 deletions(-) diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index eca001d2a..2c2d30ab6 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -313,7 +313,7 @@ Variants { } StyledText { // Somehow gets fucked up if made a ClockText??? - visible: Config.options.background.quote.length > 0 + visible: Config.options.background.showQuote && Config.options.background.quote.length > 0 Layout.fillWidth: true horizontalAlignment: bgRoot.textHorizontalAlignment font { @@ -332,10 +332,11 @@ Variants { Loader { id: cookieClockLoader - visible: root.clockStyle === "cookie" || root.clockStyle === "simpler-cookie" + visible: root.clockStyle === "cookie" active: visible sourceComponent: CookieClock {} } + } Item { @@ -409,7 +410,7 @@ Variants { } } - // Components + // ComponentsCookieClock {} component ClockText: StyledText { Layout.fillWidth: true horizontalAlignment: bgRoot.textHorizontalAlignment diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index db3f44d62..8f5bb1f23 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -14,14 +14,16 @@ Item { id: root readonly property string clockStyle: Config.options.background.clock.style + readonly property bool showQuote: Config.options.background.showQuote && Config.options.background.quote.length > 0 && !GlobalStates.screenLocked + property real implicitSize: 230 property real hourHandLength: 72 property real hourHandWidth: 20 property real minuteHandLength: 95 - property real minuteHandWidth: clockStyle === "simpler-cookie" ? hourHandWidth : 12 + property real minuteHandWidth: Config.options.background.clock.cookie.minuteHandSizeAdjust ? hourHandWidth : 12 property real centerDotSize: 10 - property real hourDotSize: minuteHandWidth + property real hourDotSize: 12 property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer @@ -38,7 +40,17 @@ Item { implicitHeight: implicitSize DropShadow { - source: cookie + source: cookie + anchors.fill: source + horizontalOffset: 0 + verticalOffset: 2 + radius: 12 + samples: radius * 2 + 1 + color: root.colShadow + transparentBorder: true + } + DropShadow { + source: quoteBox anchors.fill: source horizontalOffset: 0 verticalOffset: 2 @@ -60,7 +72,7 @@ Item { Repeater { model: 12 Item { - visible: clockStyle === "simpler-cookie" ? false : true + visible: Config.options.background.clock.cookie.hourDots required property int index rotation: 360 / 12 * index anchors.fill: parent @@ -85,7 +97,7 @@ Item { z: 1 anchors.centerIn: cookie spacing: -16 - visible: clockStyle === "simpler-cookie" ? false : true + visible: Config.options.background.clock.cookie.timeIndicators // Numbers Repeater { @@ -137,7 +149,7 @@ Item { // Center dot Rectangle { - visible: clockStyle === "simpler-cookie" ? false : true + visible: !Config.options.background.clock.cookie.minuteHandSizeAdjust z: 4 color: root.colOnHourHand anchors.centerIn: parent @@ -145,4 +157,43 @@ Item { implicitHeight: implicitWidth radius: implicitWidth / 2 } + + // Quote + Rectangle{ + id: quoteBox + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.bottom + anchors.topMargin: 24 + + implicitWidth: quoteText.width + quoteIcon.width + 12 // 12 for spacing on both sides + implicitHeight: showQuote ? 30 : 0 // A better way to hide can be found + radius: Appearance.rounding.small + color: Appearance.colors.colSecondaryContainer + + RowLayout{ + anchors.centerIn: parent + spacing: 4 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + MaterialSymbol{ + id: quoteIcon + visible: showQuote > 0 + iconSize: Appearance.font.pixelSize.huge + text: "comic_bubble" + } + StyledText{ + id: quoteText + visible : showQuote > 0 + Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter + text: Config.options.background.quote + font { + family: Appearance.font.family.main + pixelSize: Appearance.font.pixelSize.large + weight: Font.Normal + } + } + } + } } diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 93c6c3430..a73b140c3 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -127,13 +127,20 @@ Singleton { property real x: -500 property real y: -500 property bool show: true - property string style: "cookie" // Options: "cookie", "digital", "simpler-cookie" + property string style: "cookie" // Options: "cookie", "digital" property real scale: 1 property int clockSides: 12 + property JsonObject cookie: JsonObject { + property bool hourDots: true + property bool timeIndicators: true + property bool minuteHandSizeAdjust: true + } + } property string wallpaperPath: "" property string thumbnailPath: "" property string quote: "" + property bool showQuote: true property bool hideWhenFullscreen: true property JsonObject parallax: JsonObject { property bool vertical: false diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 1c4ae0468..f03a90a99 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -12,11 +12,20 @@ ContentPage { icon: "wallpaper" title: Translation.tr("Background") - ConfigSwitch { - text: Translation.tr("Show clock") - checked: Config.options.background.clock.show - onCheckedChanged: { - Config.options.background.clock.show = checked; + ConfigRow{ + ConfigSwitch { + text: Translation.tr("Show clock") + checked: Config.options.background.clock.show + onCheckedChanged: { + Config.options.background.clock.show = checked; + } + } + ConfigSwitch { + text: Translation.tr("Show quote") + checked: Config.options.background.showQuote + onCheckedChanged: { + Config.options.background.showQuote = checked; + } } } @@ -43,7 +52,8 @@ ContentPage { } } } - + + ContentSubsection { title: Translation.tr("Clock style") ConfigSelectionArray { @@ -61,16 +71,51 @@ ContentPage { displayName: Translation.tr("Material cookie"), icon: "cookie", value: "cookie" - }, - { - displayName: Translation.tr("Material simpler cookie"), - icon: "circle", - value: "simpler-cookie" - }, + } ] } } + ContentSubsection { + title: Translation.tr("Cookie clock options") + ConfigRow{ + ConfigSwitch { + text: Translation.tr("Hour dots") + checked: Config.options.background.clock.cookie.hourDots + onCheckedChanged: { + Config.options.background.clock.cookie.hourDots = checked; + } + } + ConfigSwitch { + text: Translation.tr("Time indicator") + checked: Config.options.background.clock.cookie.timeIndicators + onCheckedChanged: { + Config.options.background.clock.cookie.timeIndicators = checked; + } + } + ConfigSwitch { + text: Translation.tr("Minute hand adjust") + checked: Config.options.background.clock.cookie.minuteHandSizeAdjust + onCheckedChanged: { + Config.options.background.clock.cookie.minuteHandSizeAdjust = checked; + } + } + } + } + + ContentSubsection { + title: Translation.tr("Quote settings") + MaterialTextArea { + Layout.fillWidth: true + placeholderText: Translation.tr("Quote") + text: Config.options.background.quote + wrapMode: TextEdit.Wrap + onTextChanged: { + Config.options.background.quote = text; + } + } + } + ContentSubsection { title: Translation.tr("Wallpaper parallax") From ccaa13fa21c43e877a840a5d5117edd589e2ba97 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 14:20:02 +0300 Subject: [PATCH 005/125] add animation to cookie clock quote --- .../quickshell/ii/modules/background/CookieClock.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 8f5bb1f23..c11955ed2 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -170,12 +170,17 @@ Item { radius: Appearance.rounding.small color: Appearance.colors.colSecondaryContainer + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + RowLayout{ anchors.centerIn: parent spacing: 4 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } + MaterialSymbol{ id: quoteIcon visible: showQuote > 0 From 67dd730666fe5bb5cf523346270ee1b22fa3984d Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 14:36:30 +0300 Subject: [PATCH 006/125] add icons to settings --- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 3b56fcd67..e98b6a0d3 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -14,6 +14,7 @@ ContentPage { ConfigRow{ ConfigSwitch { + buttonIcon: "nest_clock_farsight_analog" text: Translation.tr("Show clock") checked: Config.options.background.clock.show onCheckedChanged: { @@ -21,6 +22,7 @@ ContentPage { } } ConfigSwitch { + buttonIcon: "format_quote" text: Translation.tr("Show quote") checked: Config.options.background.showQuote onCheckedChanged: { @@ -31,6 +33,7 @@ ContentPage { ConfigRow{ ConfigSpinBox { + icon: "loupe" text: Translation.tr("Scale (%)") value: Config.options.background.clock.scale * 100 from: 1 @@ -42,6 +45,7 @@ ContentPage { } ConfigSpinBox { + icon: "support" text: Translation.tr("Clock sides") value: Config.options.background.clock.clockSides from: 1 @@ -79,7 +83,9 @@ ContentPage { ContentSubsection { title: Translation.tr("Cookie clock options") ConfigRow{ + enabled: Config.options.background.clock.style === "cookie" ConfigSwitch { + buttonIcon: "graph_6" text: Translation.tr("Hour dots") checked: Config.options.background.clock.cookie.hourDots onCheckedChanged: { @@ -87,13 +93,15 @@ ContentPage { } } ConfigSwitch { - text: Translation.tr("Time indicator") + buttonIcon: "farsight_digital" + text: Translation.tr("Clock indicator") checked: Config.options.background.clock.cookie.timeIndicators onCheckedChanged: { Config.options.background.clock.cookie.timeIndicators = checked; } } ConfigSwitch { + buttonIcon: "line_end" text: Translation.tr("Minute hand adjust") checked: Config.options.background.clock.cookie.minuteHandSizeAdjust onCheckedChanged: { From 0f29869a76171b4e4c758ec9bb8517e6acb9f8d1 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 14:58:32 +0300 Subject: [PATCH 007/125] change settings layout a little --- .../ii/modules/settings/InterfaceConfig.qml | 95 +++++++++---------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index e98b6a0d3..f3116e353 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -31,31 +31,20 @@ ContentPage { } } - ConfigRow{ - ConfigSpinBox { - icon: "loupe" - text: Translation.tr("Scale (%)") - value: Config.options.background.clock.scale * 100 - from: 1 - to: 200 - stepSize: 2 - onValueChanged: { - Config.options.background.clock.scale = value / 100; - } - } - - ConfigSpinBox { - icon: "support" - text: Translation.tr("Clock sides") - value: Config.options.background.clock.clockSides - from: 1 - to: 36 - stepSize: 1 - onValueChanged: { - Config.options.background.clock.clockSides = value; - } + ConfigSpinBox { + icon: "loupe" + text: Translation.tr("Scale (%)") + value: Config.options.background.clock.scale * 100 + from: 1 + to: 200 + stepSize: 2 + onValueChanged: { + Config.options.background.clock.scale = value / 100; } } + + + ContentSubsection { @@ -80,36 +69,46 @@ ContentPage { } } - ContentSubsection { - title: Translation.tr("Cookie clock options") - ConfigRow{ - enabled: Config.options.background.clock.style === "cookie" - ConfigSwitch { - buttonIcon: "graph_6" - text: Translation.tr("Hour dots") - checked: Config.options.background.clock.cookie.hourDots - onCheckedChanged: { - Config.options.background.clock.cookie.hourDots = checked; - } + ConfigSpinBox { + enabled: Config.options.background.clock.style === "cookie" + icon: "support" + text: Translation.tr("Clock sides") + value: Config.options.background.clock.clockSides + from: 1 + to: 36 + stepSize: 1 + onValueChanged: { + Config.options.background.clock.clockSides = value; + } + } + ConfigRow{ + enabled: Config.options.background.clock.style === "cookie" + ConfigSwitch { + buttonIcon: "graph_6" + text: Translation.tr("Hour dots") + checked: Config.options.background.clock.cookie.hourDots + onCheckedChanged: { + Config.options.background.clock.cookie.hourDots = checked; } - ConfigSwitch { - buttonIcon: "farsight_digital" - text: Translation.tr("Clock indicator") - checked: Config.options.background.clock.cookie.timeIndicators - onCheckedChanged: { - Config.options.background.clock.cookie.timeIndicators = checked; - } + } + ConfigSwitch { + buttonIcon: "farsight_digital" + text: Translation.tr("Clock indicator") + checked: Config.options.background.clock.cookie.timeIndicators + onCheckedChanged: { + Config.options.background.clock.cookie.timeIndicators = checked; } - ConfigSwitch { - buttonIcon: "line_end" - text: Translation.tr("Minute hand adjust") - checked: Config.options.background.clock.cookie.minuteHandSizeAdjust - onCheckedChanged: { - Config.options.background.clock.cookie.minuteHandSizeAdjust = checked; - } + } + ConfigSwitch { + buttonIcon: "line_end" + text: Translation.tr("Minute hand adjust") + checked: Config.options.background.clock.cookie.minuteHandSizeAdjust + onCheckedChanged: { + Config.options.background.clock.cookie.minuteHandSizeAdjust = checked; } } } + ContentSubsection { title: Translation.tr("Quote settings") From b0987b224d73cf4befba2164eb862fe2a8ff3248 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 17:28:30 +0300 Subject: [PATCH 008/125] added center glow , wave animation etc. --- .../ii/modules/background/CookieClock.qml | 78 +++++++++++++++++-- .../quickshell/ii/modules/common/Config.qml | 2 + .../modules/common/widgets/MaterialCookie.qml | 21 ++++- .../ii/modules/settings/InterfaceConfig.qml | 44 ++++++++--- 4 files changed, 130 insertions(+), 15 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index c11955ed2..b147f04fc 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -24,6 +24,9 @@ Item { property real minuteHandWidth: Config.options.background.clock.cookie.minuteHandSizeAdjust ? hourHandWidth : 12 property real centerDotSize: 10 property real hourDotSize: 12 + property real centerGlowSize: 135 + + property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer @@ -31,10 +34,11 @@ Item { property color colHourHand: Appearance.colors.colPrimary property color colMinuteHand: Appearance.colors.colSecondaryActive property color colOnHourHand: Appearance.colors.colOnPrimary - + property color colTimeIndicators: Appearance.colors.colSecondaryContainerHover readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 readonly property int clockMinute: parseInt(clockNumbers[1]) + implicitWidth: implicitSize implicitHeight: implicitSize @@ -72,7 +76,10 @@ Item { Repeater { model: 12 Item { - visible: Config.options.background.clock.cookie.hourDots + opacity: Config.options.background.clock.cookie.hourDots ? 1.0 : 0 // Not using visible to allow smooth transition + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } required property int index rotation: 360 / 12 * index anchors.fill: parent @@ -90,6 +97,41 @@ Item { } } } + + } + + // Center glow behind the cookie + Rectangle { + id: glowLines + z: 1 + anchors.centerIn: cookie + Repeater { + model: 12 + Item { + opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 // Not using visible to allow smooth transition + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + required property int index + rotation: 360 / 12 * index + anchors.fill: parent + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: 50 + } + implicitWidth: root.hourDotSize + implicitHeight: implicitWidth / 2 + radius: implicitWidth / 2 + color: root.colOnBackground + opacity: Config.options.background.clock.cookie.centerGlow ? 0.5 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } + } } Column { @@ -97,7 +139,6 @@ Item { z: 1 anchors.centerIn: cookie spacing: -16 - visible: Config.options.background.clock.cookie.timeIndicators // Numbers Repeater { @@ -105,9 +146,19 @@ Item { delegate: StyledText { required property string modelData + opacity: Config.options.background.clock.cookie.timeIndicators ? 1.0 : 0 // Not using visible to allow smooth transition + Behavior on opacity { // LOOK + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } anchors.horizontalCenter: parent?.horizontalCenter font { - pixelSize: modelData.match(/am|pm/i) ? 26 : 68 + // A better way to do this? probably yes, do i know : no + property real numberSizeWithoutGlow: modelData.match(/am|pm/i) ? 26 : 68 + property real numberSizeWithGlow: modelData.match(/am|pm/i) ? 10 : 40 + pixelSize: Config.options.background.clock.cookie.centerGlow ? numberSizeWithGlow : numberSizeWithoutGlow + Behavior on pixelSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } family: Appearance.font.family.expressive weight: Font.Bold } @@ -138,6 +189,9 @@ Item { z: 3 rotation: -90 + (360 / 60) * root.clockMinute Rectangle { + Behavior on height { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } anchors.verticalCenter: parent.verticalCenter x: parent.width / 2 - minuteHandWidth / 2 width: minuteHandLength @@ -149,7 +203,10 @@ Item { // Center dot Rectangle { - visible: !Config.options.background.clock.cookie.minuteHandSizeAdjust + opacity: !Config.options.background.clock.cookie.minuteHandSizeAdjust ? 1.0 : 0 // Not using visible to allow smooth transition + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } z: 4 color: root.colOnHourHand anchors.centerIn: parent @@ -158,6 +215,17 @@ Item { radius: implicitWidth / 2 } + // Center glow + Rectangle { + visible: Config.options.background.clock.cookie.centerGlow + z: 0 + color: root.colTimeIndicators + anchors.centerIn: parent + implicitWidth: centerGlowSize + implicitHeight: centerGlowSize + radius: implicitWidth / 2 + } + // Quote Rectangle{ id: quoteBox diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index a73b140c3..679db2d6e 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -134,6 +134,8 @@ Singleton { property bool hourDots: true property bool timeIndicators: true property bool minuteHandSizeAdjust: true + property bool centerGlow: true + property bool waveAnimation: true } } diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 3f85cb294..968cfb424 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -1,6 +1,8 @@ import QtQuick import QtQuick.Shapes import Quickshell +import qs.modules.common + Item { id: root @@ -12,9 +14,25 @@ Item { property color color: "#605790" property alias strokeWidth: shapePath.strokeWidth + property bool waveAnimation: Config.options.background.clock.cookie.waveAnimation + + implicitWidth: implicitSize implicitHeight: implicitSize + property real waveTime: 0 + Loader{ + active: waveAnimation + sourceComponent: Timer{ + interval: 16 // Does it effect performance, probably, is it noticeable, not really + running: true; repeat: true + onTriggered: { + root.waveTime += 0.05 + } + } + } + + Shape { id: shape anchors.fill: parent @@ -35,7 +53,7 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var wave = Math.sin(angle * root.sides + Math.PI/2) * root.amplitude + var wave = waveAnimation ? Math.sin(angle * root.sides + Math.PI/2 + root.waveTime) * root.amplitude : Math.sin(angle * root.sides + Math.PI/2) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy points.push(Qt.point(x, y)) @@ -45,6 +63,7 @@ Item { path: pointsList } + } } } diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index f3116e353..e26911a23 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -69,16 +69,41 @@ ContentPage { } } - ConfigSpinBox { + ConfigRow{ enabled: Config.options.background.clock.style === "cookie" - icon: "support" - text: Translation.tr("Clock sides") - value: Config.options.background.clock.clockSides - from: 1 - to: 36 - stepSize: 1 - onValueChanged: { - Config.options.background.clock.clockSides = value; + ConfigSpinBox { + icon: "support" + text: Translation.tr("Clock sides") + value: Config.options.background.clock.clockSides + from: 1 + to: 36 + stepSize: 1 + onValueChanged: { + Config.options.background.clock.clockSides = value; + } + } + ConfigSwitch { + enabled: Config.options.background.clock.cookie.hourDots + buttonIcon: "brightness_7" + text: Translation.tr("Center glow") + checked: Config.options.background.clock.cookie.centerGlow + onEnabledChanged: { + checked = Config.options.background.clock.cookie.centerGlow + } + onCheckedChanged: { + Config.options.background.clock.cookie.centerGlow = checked; + } + } + ConfigSwitch { + buttonIcon: "waves" + text: Translation.tr("Wave animation") + checked: Config.options.background.clock.cookie.waveAnimation + onCheckedChanged: { + Config.options.background.clock.cookie.waveAnimation = checked; + } + StyledToolTip { + text: "It may effect performance" + } } } ConfigRow{ @@ -89,6 +114,7 @@ ContentPage { checked: Config.options.background.clock.cookie.hourDots onCheckedChanged: { Config.options.background.clock.cookie.hourDots = checked; + Config.options.background.clock.cookie.centerGlow = checked ? Config.options.background.clock.cookie.centerGlow : false; } } ConfigSwitch { From ae74354140572ad21b72588e4f52635cd5ff73cc Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 17:48:19 +0300 Subject: [PATCH 009/125] fixed bad settings layout, still could be better though --- .../ii/modules/settings/InterfaceConfig.qml | 62 ++++++++++--------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index e26911a23..3daea8214 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -69,17 +69,28 @@ ContentPage { } } + ConfigSpinBox { + enabled: Config.options.background.clock.style === "cookie" + icon: "support" + text: Translation.tr("Clock sides") + value: Config.options.background.clock.clockSides + from: 1 + to: 36 + stepSize: 1 + onValueChanged: { + Config.options.background.clock.clockSides = value; + } + } + ConfigRow{ enabled: Config.options.background.clock.style === "cookie" - ConfigSpinBox { - icon: "support" - text: Translation.tr("Clock sides") - value: Config.options.background.clock.clockSides - from: 1 - to: 36 - stepSize: 1 - onValueChanged: { - Config.options.background.clock.clockSides = value; + ConfigSwitch { + buttonIcon: "graph_6" + text: Translation.tr("Hour dots") + checked: Config.options.background.clock.cookie.hourDots + onCheckedChanged: { + Config.options.background.clock.cookie.hourDots = checked; + Config.options.background.clock.cookie.centerGlow = checked ? Config.options.background.clock.cookie.centerGlow : false; } } ConfigSwitch { @@ -94,29 +105,11 @@ ContentPage { Config.options.background.clock.cookie.centerGlow = checked; } } - ConfigSwitch { - buttonIcon: "waves" - text: Translation.tr("Wave animation") - checked: Config.options.background.clock.cookie.waveAnimation - onCheckedChanged: { - Config.options.background.clock.cookie.waveAnimation = checked; - } - StyledToolTip { - text: "It may effect performance" - } - } } + ConfigRow{ enabled: Config.options.background.clock.style === "cookie" - ConfigSwitch { - buttonIcon: "graph_6" - text: Translation.tr("Hour dots") - checked: Config.options.background.clock.cookie.hourDots - onCheckedChanged: { - Config.options.background.clock.cookie.hourDots = checked; - Config.options.background.clock.cookie.centerGlow = checked ? Config.options.background.clock.cookie.centerGlow : false; - } - } + ConfigSwitch { buttonIcon: "farsight_digital" text: Translation.tr("Clock indicator") @@ -133,6 +126,17 @@ ContentPage { Config.options.background.clock.cookie.minuteHandSizeAdjust = checked; } } + ConfigSwitch { + buttonIcon: "waves" + text: Translation.tr("Wave animation") + checked: Config.options.background.clock.cookie.waveAnimation + onCheckedChanged: { + Config.options.background.clock.cookie.waveAnimation = checked; + } + StyledToolTip { + text: "It may effect performance" + } + } } From f7633dd61f104f00a6c3c5f1909245c20e5a648c Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 18:13:06 +0300 Subject: [PATCH 010/125] add secondDot , fix settings layout little more --- .../ii/modules/background/CookieClock.qml | 51 ++++++++++++++++++- .../quickshell/ii/modules/common/Config.qml | 1 + .../modules/common/widgets/MaterialCookie.qml | 2 +- .../ii/modules/settings/InterfaceConfig.qml | 13 ++++- 4 files changed, 63 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index b147f04fc..0bcbe7184 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -25,7 +25,7 @@ Item { property real centerDotSize: 10 property real hourDotSize: 12 property real centerGlowSize: 135 - + property real secondDotSize: 20 property color colShadow: Appearance.colors.colShadow @@ -35,11 +35,27 @@ Item { property color colMinuteHand: Appearance.colors.colSecondaryActive property color colOnHourHand: Appearance.colors.colOnPrimary property color colTimeIndicators: Appearance.colors.colSecondaryContainerHover + property color colSecondDot: Appearance.colors.colTertiary readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 readonly property int clockMinute: parseInt(clockNumbers[1]) - + property int clockSecond: 0 + + Loader{ + active: Config.option.background.clock.cookie.secondDot + sourceComponent: Timer { + interval: 1000 + running: true;repeat: true + onTriggered: { + var now = new Date() + clockSecond = now.getSeconds() + } + } + } + + + implicitWidth: implicitSize implicitHeight: implicitSize @@ -134,6 +150,7 @@ Item { } } + // Numbers column Column { id: timeIndicators z: 1 @@ -187,6 +204,9 @@ Item { Item { anchors.fill: parent z: 3 + Behavior on rotation{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } rotation: -90 + (360 / 60) * root.clockMinute Rectangle { Behavior on height { @@ -226,6 +246,33 @@ Item { radius: implicitWidth / 2 } + + // Second dot + Item { + opacity: Config.options.background.clock.cookie.secondDot ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on rotation{ + animation: Appearance.animation.elementMove.numberAnimation.createObject(this) + } + rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand + anchors.fill: parent + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: 10 + } + implicitWidth: root.secondDotSize + implicitHeight: implicitWidth + radius: implicitWidth / 2 + color: colSecondDot + opacity: 1.0 + } + } + + // Quote Rectangle{ id: quoteBox diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 679db2d6e..abff81bf5 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -136,6 +136,7 @@ Singleton { property bool minuteHandSizeAdjust: true property bool centerGlow: true property bool waveAnimation: true + property bool secondDot: true } } diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 968cfb424..587fdd541 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -53,7 +53,7 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var wave = waveAnimation ? Math.sin(angle * root.sides + Math.PI/2 + root.waveTime) * root.amplitude : Math.sin(angle * root.sides + Math.PI/2) * root.amplitude + var wave = waveAnimation ? Math.sin(angle * root.sides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.sides + Math.PI/2) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy points.push(Qt.point(x, y)) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 3daea8214..730515367 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -106,7 +106,7 @@ ContentPage { } } } - + ConfigRow{ enabled: Config.options.background.clock.style === "cookie" @@ -126,6 +126,17 @@ ContentPage { Config.options.background.clock.cookie.minuteHandSizeAdjust = checked; } } + } + ConfigRow{ + enabled: Config.options.background.clock.style === "cookie" + ConfigSwitch { + buttonIcon: "pace" + text: Translation.tr("Second dot") + checked: Config.options.background.clock.cookie.secondDot + onCheckedChanged: { + Config.options.background.clock.cookie.secondDot = checked; + } + } ConfigSwitch { buttonIcon: "waves" text: Translation.tr("Wave animation") From 3e6a68b47244f008eba27c2cf204dca7f81f39e0 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 19:50:51 +0300 Subject: [PATCH 011/125] fix multiline quote --- .config/quickshell/ii/modules/background/CookieClock.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 0bcbe7184..ef0aef780 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -280,14 +280,17 @@ Item { anchors.top: parent.bottom anchors.topMargin: 24 - implicitWidth: quoteText.width + quoteIcon.width + 12 // 12 for spacing on both sides - implicitHeight: showQuote ? 30 : 0 // A better way to hide can be found + implicitWidth: quoteText.width + quoteIcon.width + 16 // 12 for spacing on both sides + implicitHeight: showQuote ? quoteText.height + 8 : 0 radius: Appearance.rounding.small color: Appearance.colors.colSecondaryContainer Behavior on implicitHeight { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } From 25f6f09d22810e1a4c871304ef0126d242974d82 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sat, 4 Oct 2025 19:54:04 +0300 Subject: [PATCH 012/125] typo fix --- .config/quickshell/ii/modules/background/CookieClock.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index ef0aef780..018016585 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -280,7 +280,7 @@ Item { anchors.top: parent.bottom anchors.topMargin: 24 - implicitWidth: quoteText.width + quoteIcon.width + 16 // 12 for spacing on both sides + implicitWidth: quoteText.width + quoteIcon.width + 16 // for spacing on both sides implicitHeight: showQuote ? quoteText.height + 8 : 0 radius: Appearance.rounding.small color: Appearance.colors.colSecondaryContainer @@ -315,6 +315,7 @@ Item { family: Appearance.font.family.main pixelSize: Appearance.font.pixelSize.large weight: Font.Normal + italic: true } } } From 9726f0f586cad56651cb444f8b92d6c7645ab248 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 01:40:07 +0300 Subject: [PATCH 013/125] change settings layout, add option for minuteHand and more.. --- .../ii/modules/background/CookieClock.qml | 75 +++++++-- .../quickshell/ii/modules/common/Config.qml | 6 +- .../ii/modules/settings/InterfaceConfig.qml | 152 +++++++++++++----- 3 files changed, 175 insertions(+), 58 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 018016585..6dd352eb1 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -21,11 +21,15 @@ Item { property real hourHandLength: 72 property real hourHandWidth: 20 property real minuteHandLength: 95 - property real minuteHandWidth: Config.options.background.clock.cookie.minuteHandSizeAdjust ? hourHandWidth : 12 + property real minuteHandWidth: Config.options.background.clock.cookie.minuteHandStyle === "bold" ? hourHandWidth : 12 property real centerDotSize: 10 property real hourDotSize: 12 property real centerGlowSize: 135 property real secondDotSize: 20 + property real secondsHandWidth: 2 + property real secondsHandLength: 100 + + property real hourNumberSize: 36 property color colShadow: Appearance.colors.colShadow @@ -35,7 +39,7 @@ Item { property color colMinuteHand: Appearance.colors.colSecondaryActive property color colOnHourHand: Appearance.colors.colOnPrimary property color colTimeIndicators: Appearance.colors.colSecondaryContainerHover - property color colSecondDot: Appearance.colors.colTertiary + property color colSeconds: Appearance.colors.colTertiary readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 readonly property int clockMinute: parseInt(clockNumbers[1]) @@ -92,7 +96,7 @@ Item { Repeater { model: 12 Item { - opacity: Config.options.background.clock.cookie.hourDots ? 1.0 : 0 // Not using visible to allow smooth transition + opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 // Not using visible to allow smooth transition Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } @@ -113,7 +117,6 @@ Item { } } } - } // Center glow behind the cookie @@ -223,7 +226,7 @@ Item { // Center dot Rectangle { - opacity: !Config.options.background.clock.cookie.minuteHandSizeAdjust ? 1.0 : 0 // Not using visible to allow smooth transition + opacity: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? 1.0 : 0 // Not using visible to allow smooth transition Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } @@ -247,31 +250,77 @@ Item { } - // Second dot + // Second hand/ dot Item { - opacity: Config.options.background.clock.cookie.secondDot ? 1.0 : 0 + z:3 + opacity: Config.options.background.clock.cookie.secondHandStyle === "dot" || Config.options.background.clock.cookie.secondHandStyle === "line" ? 1.0 : 0 // Not using visible to allow smooth transition Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } Behavior on rotation{ - animation: Appearance.animation.elementMove.numberAnimation.createObject(this) + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand anchors.fill: parent Rectangle { + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } anchors { left: parent.left verticalCenter: parent.verticalCenter leftMargin: 10 } - implicitWidth: root.secondDotSize - implicitHeight: implicitWidth - radius: implicitWidth / 2 - color: colSecondDot - opacity: 1.0 + implicitWidth: Config.options.background.clock.cookie.secondHandStyle === "dot" ? root.secondDotSize : root.secondsHandLength + implicitHeight: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth : root.secondsHandWidth + radius: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth / 2 : root.secondsHandWidth / 2 + color: colSeconds } } + + + // Hour Indicator numbers + Repeater { + model: 4 + Item { + opacity: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 1.0 : 0 // Not using visible to allow smooth transition + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + required property int index + rotation: 360 / 4 * index + anchors.fill: parent + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: 25 + } + implicitWidth: root.hourNumberSize + implicitHeight: implicitWidth + //radius: implicitWidth / 2 + color: "transparent" + //opacity: 0.5 + StyledText{ + + color: root.colOnBackground + anchors.centerIn: parent + text: index === 0 ? "9" : index === 1 ? "12" : index === 2 ? "3" : "6" + rotation: index % 2 === 0 ? index * 90 : -index * 90 //A better way can be found to show texts on right angle + font { + family: Appearance.font.family.reading + pixelSize: 80 + weight: 1000 + } + } + } + } + } + // Quote Rectangle{ diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index abff81bf5..2363e9aa0 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -131,12 +131,12 @@ Singleton { property real scale: 1 property int clockSides: 12 property JsonObject cookie: JsonObject { - property bool hourDots: true + property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "none" + property string minuteHandStyle: "medium" // Options: "medium", "bold" + property string secondHandStyle: "dot" // Options: "dot", "line" , "none" property bool timeIndicators: true - property bool minuteHandSizeAdjust: true property bool centerGlow: true property bool waveAnimation: true - property bool secondDot: true } } diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 730515367..141ce6d1c 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -69,6 +69,93 @@ ContentPage { } } + + ConfigRow{ + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + title: Translation.tr("Dial number style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.dialNumberStyle + onSelected: newValue => { + Config.options.background.clock.cookie.dialNumberStyle = newValue; + if (newValue !== "dots") { + Config.options.background.clock.cookie.centerGlow = false; + } + if (newValue === "numbers") { + Config.options.background.clock.cookie.timeIndicators = false; + } + } + options: [ + { + displayName: Translation.tr("None"), + icon: "deselect", + value: "none" + }, + { + displayName: Translation.tr("Dots"), + icon: "graph_6", + value: "dots" + }, + { + displayName: Translation.tr("Numbers"), + icon: "123", + value: "numbers" + } + ] + } + } + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + title: Translation.tr("Seconds indicator style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.secondHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.secondHandStyle = newValue; + } + options: [ + { + displayName: Translation.tr("None"), + icon: "deselect", + value: "none" + }, + { + displayName: Translation.tr("Dot"), + icon: "adjust", + value: "dot" + }, + { + displayName: Translation.tr("Line"), + icon: "line_end", + value: "line" + } + ] + } + } + } + + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + title: Translation.tr("Minute hand style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.minuteHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.minuteHandStyle = newValue; + } + options: [ + { + displayName: Translation.tr("Medium"), + icon: "pen_size_1", + value: "medium" + }, + { + displayName: Translation.tr("Bold"), + icon: "pen_size_5", + value: "bold" + }, + ] + } + } + ConfigSpinBox { enabled: Config.options.background.clock.style === "cookie" icon: "support" @@ -81,20 +168,23 @@ ContentPage { Config.options.background.clock.clockSides = value; } } + ConfigSwitch { + enabled: Config.options.background.clock.style === "cookie" + buttonIcon: "waves" + text: Translation.tr("Wave animation") + checked: Config.options.background.clock.cookie.waveAnimation + onCheckedChanged: { + Config.options.background.clock.cookie.waveAnimation = checked; + } + StyledToolTip { + text: "It may effect performance" + } + } ConfigRow{ enabled: Config.options.background.clock.style === "cookie" ConfigSwitch { - buttonIcon: "graph_6" - text: Translation.tr("Hour dots") - checked: Config.options.background.clock.cookie.hourDots - onCheckedChanged: { - Config.options.background.clock.cookie.hourDots = checked; - Config.options.background.clock.cookie.centerGlow = checked ? Config.options.background.clock.cookie.centerGlow : false; - } - } - ConfigSwitch { - enabled: Config.options.background.clock.cookie.hourDots + enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" buttonIcon: "brightness_7" text: Translation.tr("Center glow") checked: Config.options.background.clock.cookie.centerGlow @@ -104,50 +194,28 @@ ContentPage { onCheckedChanged: { Config.options.background.clock.cookie.centerGlow = checked; } + StyledToolTip { + text: "Can only be turned on using the 'Dots' dial style for aesthetic reasons" + } } - } - ConfigRow{ - enabled: Config.options.background.clock.style === "cookie" - ConfigSwitch { + enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" buttonIcon: "farsight_digital" text: Translation.tr("Clock indicator") checked: Config.options.background.clock.cookie.timeIndicators + onEnabledChanged: { + checked = Config.options.background.clock.cookie.timeIndicators + } onCheckedChanged: { Config.options.background.clock.cookie.timeIndicators = checked; } - } - ConfigSwitch { - buttonIcon: "line_end" - text: Translation.tr("Minute hand adjust") - checked: Config.options.background.clock.cookie.minuteHandSizeAdjust - onCheckedChanged: { - Config.options.background.clock.cookie.minuteHandSizeAdjust = checked; - } - } - } - ConfigRow{ - enabled: Config.options.background.clock.style === "cookie" - ConfigSwitch { - buttonIcon: "pace" - text: Translation.tr("Second dot") - checked: Config.options.background.clock.cookie.secondDot - onCheckedChanged: { - Config.options.background.clock.cookie.secondDot = checked; - } - } - ConfigSwitch { - buttonIcon: "waves" - text: Translation.tr("Wave animation") - checked: Config.options.background.clock.cookie.waveAnimation - onCheckedChanged: { - Config.options.background.clock.cookie.waveAnimation = checked; - } StyledToolTip { - text: "It may effect performance" + text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons" } } + + } From c643d26bce539827cbaecd952ae88b6c9e12ea11 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 01:55:39 +0300 Subject: [PATCH 014/125] add date to clock --- .../ii/modules/background/CookieClock.qml | 39 ++++++++++++++++++- .../quickshell/ii/modules/common/Config.qml | 1 + .../ii/modules/settings/InterfaceConfig.qml | 19 ++++++++- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 6dd352eb1..8fc09a84d 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -252,6 +252,7 @@ Item { // Second hand/ dot Item { + id: secondHand z:3 opacity: Config.options.background.clock.cookie.secondHandStyle === "dot" || Config.options.background.clock.cookie.secondHandStyle === "line" ? 1.0 : 0 // Not using visible to allow smooth transition Behavior on opacity { @@ -281,7 +282,43 @@ Item { } } - + // Date + Canvas { + width: cookie.width + height: cookie.height + rotation: secondHand.rotation + 45 // +45 degrees to align with minute hand + opacity: Config.options.background.clock.cookie.dateInClock ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + onPaint: { + var ctx = getContext("2d"); + ctx.clearRect(0,0,width,height); + ctx.font = "700 30px gabarito"; + + var text = DateTime.date.substring(0,3) + " " + DateTime.date.substring(4,7); + var radius = 78; + var angleStep = Math.PI / 2.35 / text.length; + + for (var i=0; i= 3) + ctx.fillStyle = root.colOnBackground; + else + ctx.fillStyle = Appearance.colors.colSecondaryHover; + + ctx.fillText(text[i], 0, 0); + ctx.restore(); + } + } + } // Hour Indicator numbers Repeater { diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 2363e9aa0..2ce21ac8a 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -136,6 +136,7 @@ Singleton { property string secondHandStyle: "dot" // Options: "dot", "line" , "none" property bool timeIndicators: true property bool centerGlow: true + property bool dateInClock: true property bool waveAnimation: true } diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 141ce6d1c..5288c6342 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -84,6 +84,9 @@ ContentPage { if (newValue === "numbers") { Config.options.background.clock.cookie.timeIndicators = false; } + if (newValue != "none"){ + Config.options.background.clock.cookie.dateInClock = false; + } } options: [ { @@ -214,7 +217,21 @@ ContentPage { text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons" } } - + ConfigSwitch { + enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "none" + buttonIcon: "farsight_digital" + text: Translation.tr("Date inside clock") + checked: Config.options.background.clock.cookie.dateInClock + onEnabledChanged: { + checked = Config.options.background.clock.cookie.dateInClock + } + onCheckedChanged: { + Config.options.background.clock.cookie.dateInClock = checked; + } + StyledToolTip { + text: "Can only be turned on when not using any dial style for aesthetic reasons" + } + } } From 29413fdc8e1d1accb145a187a519af3871760a77 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 02:24:36 +0300 Subject: [PATCH 015/125] hide settings when digital clock is selected --- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 5288c6342..d3e538cf1 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -71,6 +71,7 @@ ContentPage { ConfigRow{ + visible: Config.options.background.clock.style === "cookie" ContentSubsection { enabled: Config.options.background.clock.style === "cookie" title: Translation.tr("Dial number style") @@ -110,6 +111,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" title: Translation.tr("Seconds indicator style") + visible: Config.options.background.clock.style === "cookie" ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.secondHandStyle onSelected: newValue => { @@ -138,6 +140,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" title: Translation.tr("Minute hand style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.minuteHandStyle @@ -161,6 +164,7 @@ ContentPage { ConfigSpinBox { enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" icon: "support" text: Translation.tr("Clock sides") value: Config.options.background.clock.clockSides @@ -173,6 +177,7 @@ ContentPage { } ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" buttonIcon: "waves" text: Translation.tr("Wave animation") checked: Config.options.background.clock.cookie.waveAnimation @@ -186,6 +191,7 @@ ContentPage { ConfigRow{ enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" buttonIcon: "brightness_7" @@ -204,6 +210,7 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" + visible: Config.options.background.clock.style === "cookie" buttonIcon: "farsight_digital" text: Translation.tr("Clock indicator") checked: Config.options.background.clock.cookie.timeIndicators @@ -219,6 +226,7 @@ ContentPage { } ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "none" + visible: Config.options.background.clock.style === "cookie" buttonIcon: "farsight_digital" text: Translation.tr("Date inside clock") checked: Config.options.background.clock.cookie.dateInClock From da88fd42678eef41d30fe2d8f35aac44afb04bd4 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 03:08:39 +0300 Subject: [PATCH 016/125] minor tweaks --- .config/quickshell/ii/modules/background/CookieClock.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 8fc09a84d..56dde7966 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -335,7 +335,7 @@ Item { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: 25 + leftMargin: 32 } implicitWidth: root.hourNumberSize implicitHeight: implicitWidth @@ -351,7 +351,7 @@ Item { font { family: Appearance.font.family.reading pixelSize: 80 - weight: 1000 + weight: 5000 } } } From cd3b8b5bab75dede11e10b18f976ffe06a34dccc Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 03:13:48 +0300 Subject: [PATCH 017/125] add icon to date --- .config/quickshell/ii/modules/background/CookieClock.qml | 2 +- .config/quickshell/ii/modules/settings/InterfaceConfig.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 56dde7966..8ab69e3e5 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -351,7 +351,7 @@ Item { font { family: Appearance.font.family.reading pixelSize: 80 - weight: 5000 + weight: 1000 } } } diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index d3e538cf1..c2bfd0c32 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -227,7 +227,7 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "none" visible: Config.options.background.clock.style === "cookie" - buttonIcon: "farsight_digital" + buttonIcon: "date_range" text: Translation.tr("Date inside clock") checked: Config.options.background.clock.cookie.dateInClock onEnabledChanged: { From 5787e95c51a1e74d3182ab365ab9c3d7019f8213 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 13:38:53 +0300 Subject: [PATCH 018/125] add new date style and bunch of new animations --- .../ii/modules/background/CookieClock.qml | 133 +++++++++++++----- .../quickshell/ii/modules/common/Config.qml | 1 + .../modules/common/widgets/MaterialCookie.qml | 10 +- .../ii/modules/settings/InterfaceConfig.qml | 92 +++++++----- 4 files changed, 160 insertions(+), 76 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 8ab69e3e5..a49eae3f2 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -21,7 +21,8 @@ Item { property real hourHandLength: 72 property real hourHandWidth: 20 property real minuteHandLength: 95 - property real minuteHandWidth: Config.options.background.clock.cookie.minuteHandStyle === "bold" ? hourHandWidth : 12 + property real minuteHandWidth: Config.options.background.clock.cookie.minuteHandStyle === "bold" ? hourHandWidth : + Config.options.background.clock.cookie.minuteHandStyle === "medium" ? 12 : 6 property real centerDotSize: 10 property real hourDotSize: 12 property real centerGlowSize: 135 @@ -92,34 +93,39 @@ Item { sides: Config.options.background.clock.clockSides color: root.colBackground - // 12 dots around the cookie - Repeater { - model: 12 - Item { - opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 // Not using visible to allow smooth transition - Behavior on opacity { + + } + + // 12 dots around the cookie + Repeater { + model: 12 + Item { + opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 // Not using visible to allow smooth transition + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + required property int index + rotation: 360 / 12 * index + anchors.fill: parent + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 10 : 50 + } + Behavior on anchors.leftMargin{ animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - required property int index - rotation: 360 / 12 * index - anchors.fill: parent - Rectangle { - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: 10 - } - implicitWidth: root.hourDotSize - implicitHeight: implicitWidth - radius: implicitWidth / 2 - color: root.colOnBackground - opacity: 0.5 - } + implicitWidth: root.hourDotSize + implicitHeight: implicitWidth + radius: implicitWidth / 2 + color: root.colOnBackground + opacity: 0.5 } } } - // Center glow behind the cookie + // Center glow lines Rectangle { id: glowLines z: 1 @@ -138,7 +144,7 @@ Item { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: 50 + leftMargin: Config.options.background.clock.cookie.centerGlow ? 50 : 75 } implicitWidth: root.hourDotSize implicitHeight: implicitWidth / 2 @@ -148,6 +154,9 @@ Item { Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } } } } @@ -167,15 +176,17 @@ Item { required property string modelData opacity: Config.options.background.clock.cookie.timeIndicators ? 1.0 : 0 // Not using visible to allow smooth transition - Behavior on opacity { // LOOK + Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } anchors.horizontalCenter: parent?.horizontalCenter font { // A better way to do this? probably yes, do i know : no + // (changing size based on am/pm selected or not) property real numberSizeWithoutGlow: modelData.match(/am|pm/i) ? 26 : 68 property real numberSizeWithGlow: modelData.match(/am|pm/i) ? 10 : 40 - pixelSize: Config.options.background.clock.cookie.centerGlow ? numberSizeWithGlow : numberSizeWithoutGlow + pixelSize: !Config.options.background.clock.cookie.timeIndicators ? 100 : // for open/close animation + Config.options.background.clock.cookie.centerGlow ? numberSizeWithGlow : numberSizeWithoutGlow Behavior on pixelSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } @@ -191,7 +202,7 @@ Item { // Hour hand Item { anchors.fill: parent - z: 2 + z: 3 rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) Rectangle { anchors.verticalCenter: parent.verticalCenter @@ -206,7 +217,7 @@ Item { // Minute hand Item { anchors.fill: parent - z: 3 + z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3 Behavior on rotation{ animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } @@ -240,20 +251,28 @@ Item { // Center glow Rectangle { - visible: Config.options.background.clock.cookie.centerGlow + opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 // Not using visible to allow smooth transition + Behavior on opacity { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitWidth { // Not using two animations because it looks weird + ParallelAnimation { + NumberAnimation { properties: "implicitWidth,implicitHeight"; duration: 100; easing.type: Easing.InOutQuad } + } + } z: 0 color: root.colTimeIndicators anchors.centerIn: parent - implicitWidth: centerGlowSize - implicitHeight: centerGlowSize + implicitWidth: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 + implicitHeight: implicitWidth radius: implicitWidth / 2 } - // Second hand/ dot + // Second hand/dot Item { id: secondHand - z:3 + z: Config.options.background.clock.cookie.secondHandStyle === "line" ? 2 : 3 opacity: Config.options.background.clock.cookie.secondHandStyle === "dot" || Config.options.background.clock.cookie.secondHandStyle === "line" ? 1.0 : 0 // Not using visible to allow smooth transition Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) @@ -264,6 +283,7 @@ Item { rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand anchors.fill: parent Rectangle { + Behavior on implicitHeight { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } @@ -282,12 +302,14 @@ Item { } } - // Date + // Date (the rotating one with the second hand) Canvas { + z: 0 width: cookie.width height: cookie.height rotation: secondHand.rotation + 45 // +45 degrees to align with minute hand - opacity: Config.options.background.clock.cookie.dateInClock ? 1.0 : 0 + opacity: Config.options.background.clock.cookie.dateStyle === "rotating" ? 1.0 : 0 + Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } @@ -319,8 +341,40 @@ Item { } } } + + // Date(only today's number) in right side of the clock + Rectangle{ + z: 1 + implicitWidth: 45 + implicitHeight: Config.options.background.clock.cookie.dateStyle === "square" ? 30 : 0 + Behavior on implicitHeight{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + opacity: 1.0 + anchors{ + verticalCenter: cookie.verticalCenter + right: cookie.right + rightMargin: 10 + } + color: root.colOnBackground + radius: Appearance.rounding.small // LOOK + StyledText{ + opacity: Config.options.background.clock.cookie.dateStyle === "square" ? 1.0 : 0 + Behavior on opacity{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + anchors.centerIn: parent + color: root.colHourHand + text: DateTime.date.substring(5,7) + font { + family: Appearance.font.family.expressive + pixelSize: 20 + weight: 1000 + } + } + } - // Hour Indicator numbers + // Hour Indicator numbers (3-6-9-12) Repeater { model: 4 Item { @@ -335,13 +389,14 @@ Item { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: 32 + leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 32 : 96 + } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } implicitWidth: root.hourNumberSize implicitHeight: implicitWidth - //radius: implicitWidth / 2 color: "transparent" - //opacity: 0.5 StyledText{ color: root.colOnBackground diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 2ce21ac8a..43bdb8e76 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -134,6 +134,7 @@ Singleton { property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "none" property string minuteHandStyle: "medium" // Options: "medium", "bold" property string secondHandStyle: "dot" // Options: "dot", "line" , "none" + property string dateStyle: "rotating" // Options: "rotating", "square", "none" property bool timeIndicators: true property bool centerGlow: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 587fdd541..47e75cff2 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -8,6 +8,7 @@ Item { id: root property int sides: 12 + property real animatedSides: 12 property int implicitSize: 100 property real amplitude: implicitSize / 50 property int renderPoints: 360 @@ -32,6 +33,13 @@ Item { } } + onSidesChanged: NumberAnimation { + target: root + property: "animatedSides" + to: root.sides + duration: 100 + easing.type: Easing.InOutQuad + } Shape { id: shape @@ -53,7 +61,7 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var wave = waveAnimation ? Math.sin(angle * root.sides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.sides + Math.PI/2) * root.amplitude + var wave = waveAnimation ? Math.sin(angle * root.animatedSides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.animatedSides + Math.PI/2) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy points.push(Qt.point(x, y)) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index c2bfd0c32..25b7eed36 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -87,6 +87,7 @@ ContentPage { } if (newValue != "none"){ Config.options.background.clock.cookie.dateInClock = false; + Config.options.background.clock.cookie.dateStyle = "none"; } } options: [ @@ -138,27 +139,62 @@ ContentPage { } } - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Minute hand style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.minuteHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.minuteHandStyle = newValue; + ConfigRow{ + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Minute hand style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.minuteHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.minuteHandStyle = newValue; + } + options: [ + { + displayName: Translation.tr("Thin"), + icon: "pen_size_1", + value: "thin" + }, + { + displayName: Translation.tr("Medium"), + icon: "pen_size_3", + value: "medium" + }, + { + displayName: Translation.tr("Bold"), + icon: "pen_size_5", + value: "bold" + } + ] + } + } + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "none" + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Date style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.dateStyle + onSelected: newValue => { + Config.options.background.clock.cookie.dateStyle = newValue; + } + options: [ + { + displayName: Translation.tr("None"), + icon: "deselect", + value: "none" + }, + { + displayName: Translation.tr("Rotating"), + icon: "rotate_right", + value: "rotating" + }, + { + displayName: Translation.tr("Square"), + icon: "square", + value: "square" + } + ] } - options: [ - { - displayName: Translation.tr("Medium"), - icon: "pen_size_1", - value: "medium" - }, - { - displayName: Translation.tr("Bold"), - icon: "pen_size_5", - value: "bold" - }, - ] } } @@ -224,22 +260,6 @@ ContentPage { text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons" } } - ConfigSwitch { - enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "none" - visible: Config.options.background.clock.style === "cookie" - buttonIcon: "date_range" - text: Translation.tr("Date inside clock") - checked: Config.options.background.clock.cookie.dateInClock - onEnabledChanged: { - checked = Config.options.background.clock.cookie.dateInClock - } - onCheckedChanged: { - Config.options.background.clock.cookie.dateInClock = checked; - } - StyledToolTip { - text: "Can only be turned on when not using any dial style for aesthetic reasons" - } - } } From af538950a88e2e9b7f7d9dd82dbe5a23692b9189 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 13:49:39 +0300 Subject: [PATCH 019/125] a lil font change --- .config/quickshell/ii/modules/background/CookieClock.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index a49eae3f2..add8dc1da 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -190,7 +190,7 @@ Item { Behavior on pixelSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - family: Appearance.font.family.expressive + family: Appearance.font.family.main weight: Font.Bold } color: root.colOnBackground From 60b0db7120e28bfa08e2da58164ec7f7841cea96 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 14:13:13 +0300 Subject: [PATCH 020/125] lil tweaks --- .config/quickshell/ii/modules/background/CookieClock.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index add8dc1da..525503613 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -36,8 +36,8 @@ Item { property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer property color colOnBackground: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.5) - property color colHourHand: Appearance.colors.colPrimary - property color colMinuteHand: Appearance.colors.colSecondaryActive + property color colMinuteHand: Appearance.colors.colPrimary + property color colHourHand: Appearance.colors.colSecondaryActive property color colOnHourHand: Appearance.colors.colOnPrimary property color colTimeIndicators: Appearance.colors.colSecondaryContainerHover property color colSeconds: Appearance.colors.colTertiary From a90e2132e3ca1d8814fe4c164af482271c06a895 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 15:57:01 +0300 Subject: [PATCH 021/125] add new dial style --- .../ii/modules/background/CookieClock.qml | 59 +++++++++++++++++++ .../quickshell/ii/modules/common/Config.qml | 2 +- .../ii/modules/settings/InterfaceConfig.qml | 6 ++ 3 files changed, 66 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 525503613..e11c32d85 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -29,6 +29,8 @@ Item { property real secondDotSize: 20 property real secondsHandWidth: 2 property real secondsHandLength: 100 + property real hourLineSize: 5 + property real minuteLineSize: 2 property real hourNumberSize: 36 @@ -413,6 +415,63 @@ Item { } } + // Full dial style hour lines + Repeater { + model: 12 + Item { + opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + required property int index + rotation: 360 / 12 * index + anchors.fill: parent + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 + } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + implicitWidth: root.hourLineSize * 3.5 + implicitHeight: root.hourLineSize + radius: implicitWidth / 2 + color: root.colOnBackground + opacity: 1.0 + } + } + } + // Full dial style minute lines + Repeater { + model: 60 + Item { + opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + required property int index + rotation: 360 / 60 * index + anchors.fill: parent + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 + } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + implicitWidth: root.minuteLineSize * 3.5 + implicitHeight: root.minuteLineSize + radius: implicitWidth / 2 + color: root.colOnBackground + opacity: 0.5 + } + } + } + // Quote Rectangle{ diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 43bdb8e76..19664751d 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -131,7 +131,7 @@ Singleton { property real scale: 1 property int clockSides: 12 property JsonObject cookie: JsonObject { - property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "none" + property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" property string minuteHandStyle: "medium" // Options: "medium", "bold" property string secondHandStyle: "dot" // Options: "dot", "line" , "none" property string dateStyle: "rotating" // Options: "rotating", "square", "none" diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 25b7eed36..3d2603283 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -101,11 +101,17 @@ ContentPage { icon: "graph_6", value: "dots" }, + { + displayName: Translation.tr("Full"), + icon: "avg_pace", + value: "full" + }, { displayName: Translation.tr("Numbers"), icon: "123", value: "numbers" } + ] } } From 7eb5fa8d8ee60b5327255018bf7efcea06072470 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 16:17:37 +0300 Subject: [PATCH 022/125] add hour hand style --- .../ii/modules/background/CookieClock.qml | 12 ++++++---- .../quickshell/ii/modules/common/Config.qml | 1 + .../ii/modules/settings/InterfaceConfig.qml | 24 +++++++++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index e11c32d85..d87623692 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -22,7 +22,7 @@ Item { property real hourHandWidth: 20 property real minuteHandLength: 95 property real minuteHandWidth: Config.options.background.clock.cookie.minuteHandStyle === "bold" ? hourHandWidth : - Config.options.background.clock.cookie.minuteHandStyle === "medium" ? 12 : 6 + Config.options.background.clock.cookie.minuteHandStyle === "medium" ? 12 : 5 property real centerDotSize: 10 property real hourDotSize: 12 property real centerGlowSize: 135 @@ -204,7 +204,7 @@ Item { // Hour hand Item { anchors.fill: parent - z: 3 + z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) Rectangle { anchors.verticalCenter: parent.verticalCenter @@ -212,7 +212,9 @@ Item { width: hourHandLength height: hourHandWidth radius: hourHandWidth / 2 - color: root.colHourHand + color: Config.options.background.clock.cookie.hourHandStyle === "stroke" ? "transparent" : root.colHourHand + border.color: Config.options.background.clock.cookie.hourHandStyle === "stroke" ? root.colHourHand : "transparent" + border.width: Config.options.background.clock.cookie.hourHandStyle === "stroke" ? 4 : 0 } } @@ -239,12 +241,12 @@ Item { // Center dot Rectangle { - opacity: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? 1.0 : 0 // Not using visible to allow smooth transition + opacity: Config.options.background.clock.cookie.minuteHandStyle !== "bold" ? 1.0 : 0 // Not using visible to allow smooth transition Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } z: 4 - color: root.colOnHourHand + color: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? root.colBackground : root.colMinuteHand anchors.centerIn: parent implicitWidth: centerDotSize implicitHeight: implicitWidth diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 19664751d..cfd38cc50 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -132,6 +132,7 @@ Singleton { property int clockSides: 12 property JsonObject cookie: JsonObject { property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" + property string hourHandStyle: "fill" // Options: "fill", "stroke" property string minuteHandStyle: "medium" // Options: "medium", "bold" property string secondHandStyle: "dot" // Options: "dot", "line" , "none" property string dateStyle: "rotating" // Options: "rotating", "square", "none" diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 3d2603283..ad31329b3 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -204,6 +204,30 @@ ContentPage { } } + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Hour hand style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.hourHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.hourHandStyle = newValue; + } + options: [ + { + displayName: Translation.tr("Fill"), + icon: "stroke_full", + value: "fill" + }, + { + displayName: Translation.tr("Stroke"), + icon: "stroke_partial", + value: "stroke" + } + ] + } + } + ConfigSpinBox { enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie" From b3f74b6c1c4590f35563bb507b44dcd7a1609736 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 16:22:12 +0300 Subject: [PATCH 023/125] change date color --- .config/quickshell/ii/modules/background/CookieClock.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index d87623692..d06beee58 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -368,7 +368,7 @@ Item { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } anchors.centerIn: parent - color: root.colHourHand + color: Appearance.colors.colSecondaryHover text: DateTime.date.substring(5,7) font { family: Appearance.font.family.expressive From 77901659e5c72c9ee1b98beb0d498dbfb7894967 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 16:39:25 +0300 Subject: [PATCH 024/125] add a lil animation when changing hour hand style --- .../ii/modules/background/CookieClock.qml | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index d06beee58..5491b3f02 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -206,15 +206,31 @@ Item { anchors.fill: parent z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) + // Using two different rectangle for animation. Can be used only one with border.color && border.width Rectangle { + // fill + opacity: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } anchors.verticalCenter: parent.verticalCenter x: parent.width / 2 - hourHandWidth / 2 width: hourHandLength height: hourHandWidth radius: hourHandWidth / 2 - color: Config.options.background.clock.cookie.hourHandStyle === "stroke" ? "transparent" : root.colHourHand - border.color: Config.options.background.clock.cookie.hourHandStyle === "stroke" ? root.colHourHand : "transparent" - border.width: Config.options.background.clock.cookie.hourHandStyle === "stroke" ? 4 : 0 + //color: Config.options.background.clock.cookie.hourHandStyle === "stroke" ? "transparent" : root.colHourHand + color : root.colHourHand + } + Rectangle { + // border + anchors.verticalCenter: parent.verticalCenter + x: parent.width / 2 - hourHandWidth / 2 + width: hourHandLength + height: hourHandWidth + radius: hourHandWidth / 2 + color: "transparent" + border.color: root.colHourHand + border.width: 4 } } From ab54a24434ebf36db5513d7db946020195f0675d Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 16:43:13 +0300 Subject: [PATCH 025/125] make center glow active on full dial style --- .config/quickshell/ii/modules/settings/InterfaceConfig.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index ad31329b3..8759acc84 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -79,7 +79,7 @@ ContentPage { currentValue: Config.options.background.clock.cookie.dialNumberStyle onSelected: newValue => { Config.options.background.clock.cookie.dialNumberStyle = newValue; - if (newValue !== "dots") { + if (newValue !== "dots" && newValue !== "full") { Config.options.background.clock.cookie.centerGlow = false; } if (newValue === "numbers") { @@ -259,7 +259,7 @@ ContentPage { enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie" ConfigSwitch { - enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" + enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" buttonIcon: "brightness_7" text: Translation.tr("Center glow") checked: Config.options.background.clock.cookie.centerGlow From 0f7f7d997b50fb56bb86b3228ee32b365197bc45 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 16:49:47 +0300 Subject: [PATCH 026/125] seperate waveAnimation from the materialCookie component --- .config/quickshell/ii/modules/background/CookieClock.qml | 6 ++++-- .../quickshell/ii/modules/common/widgets/MaterialCookie.qml | 3 +-- .config/quickshell/ii/modules/settings/InterfaceConfig.qml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 5491b3f02..d76a28725 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -94,7 +94,7 @@ Item { amplitude: implicitSize / 70 sides: Config.options.background.clock.clockSides color: root.colBackground - + waveAnimation: Config.options.background.clock.cookie.waveAnimation } @@ -491,6 +491,7 @@ Item { } + // Quote Rectangle{ id: quoteBox @@ -502,7 +503,8 @@ Item { implicitHeight: showQuote ? quoteText.height + 8 : 0 radius: Appearance.rounding.small color: Appearance.colors.colSecondaryContainer - + + Behavior on implicitHeight { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 47e75cff2..15fb66d44 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -14,8 +14,7 @@ Item { property int renderPoints: 360 property color color: "#605790" property alias strokeWidth: shapePath.strokeWidth - - property bool waveAnimation: Config.options.background.clock.cookie.waveAnimation + property bool waveAnimation: false implicitWidth: implicitSize diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 8759acc84..20aed3474 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -270,7 +270,7 @@ ContentPage { Config.options.background.clock.cookie.centerGlow = checked; } StyledToolTip { - text: "Can only be turned on using the 'Dots' dial style for aesthetic reasons" + text: "Can only be turned on using the 'Dots' or 'Full' dial style for aesthetic reasons" } } From 7f8a5315c45229d785f593619ded1d7303491433 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 17:10:59 +0300 Subject: [PATCH 027/125] make code more readable --- .../ii/modules/background/CookieClock.qml | 157 +++++++++--------- .../quickshell/ii/modules/common/Config.qml | 8 +- .../ii/modules/settings/InterfaceConfig.qml | 41 ++--- 3 files changed, 99 insertions(+), 107 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index d76a28725..c7c927fa0 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -49,6 +49,7 @@ Item { property int clockSecond: 0 + // Loader to set root.clockSecond Loader{ active: Config.option.background.clock.cookie.secondDot sourceComponent: Timer { @@ -95,22 +96,21 @@ Item { sides: Config.options.background.clock.clockSides color: root.colBackground waveAnimation: Config.options.background.clock.cookie.waveAnimation - } - // 12 dots around the cookie + // Hour dots dial style Repeater { model: 12 Item { - opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 // Not using visible to allow smooth transition + required property int index + opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 + rotation: 360 / 12 * index + anchors.fill: parent Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - required property int index - rotation: 360 / 12 * index - anchors.fill: parent Rectangle { - anchors { + anchors{ left: parent.left verticalCenter: parent.verticalCenter leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 10 : 50 @@ -135,13 +135,13 @@ Item { Repeater { model: 12 Item { - opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 // Not using visible to allow smooth transition + required property int index + opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 + rotation: 360 / 12 * index + anchors.fill: parent Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - required property int index - rotation: 360 / 12 * index - anchors.fill: parent Rectangle { anchors { left: parent.left @@ -170,33 +170,28 @@ Item { z: 1 anchors.centerIn: cookie spacing: -16 - - // Numbers Repeater { model: root.clockNumbers delegate: StyledText { required property string modelData - opacity: Config.options.background.clock.cookie.timeIndicators ? 1.0 : 0 // Not using visible to allow smooth transition - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } anchors.horizontalCenter: parent?.horizontalCenter + color: root.colOnBackground + text: modelData.padStart(2, "0") font { - // A better way to do this? probably yes, do i know : no - // (changing size based on am/pm selected or not) property real numberSizeWithoutGlow: modelData.match(/am|pm/i) ? 26 : 68 property real numberSizeWithGlow: modelData.match(/am|pm/i) ? 10 : 40 - pixelSize: !Config.options.background.clock.cookie.timeIndicators ? 100 : // for open/close animation - Config.options.background.clock.cookie.centerGlow ? numberSizeWithGlow : numberSizeWithoutGlow + pixelSize: !Config.options.background.clock.cookie.timeIndicators ? 100 : // open/close animation + Config.options.background.clock.cookie.centerGlow ? numberSizeWithGlow : numberSizeWithoutGlow // changing size according to center glow Behavior on pixelSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } family: Appearance.font.family.main weight: Font.Bold } - color: root.colOnBackground - text: modelData.padStart(2, "0") + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } } } } @@ -210,16 +205,15 @@ Item { Rectangle { // fill opacity: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } anchors.verticalCenter: parent.verticalCenter x: parent.width / 2 - hourHandWidth / 2 width: hourHandLength height: hourHandWidth radius: hourHandWidth / 2 - //color: Config.options.background.clock.cookie.hourHandStyle === "stroke" ? "transparent" : root.colHourHand color : root.colHourHand + Behavior on opacity { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } } Rectangle { // border @@ -238,54 +232,54 @@ Item { Item { anchors.fill: parent z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3 + rotation: -90 + (360 / 60) * root.clockMinute Behavior on rotation{ animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - rotation: -90 + (360 / 60) * root.clockMinute Rectangle { - Behavior on height { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } anchors.verticalCenter: parent.verticalCenter x: parent.width / 2 - minuteHandWidth / 2 width: minuteHandLength height: minuteHandWidth radius: minuteHandWidth / 2 color: root.colMinuteHand + Behavior on height { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } } } // Center dot Rectangle { - opacity: Config.options.background.clock.cookie.minuteHandStyle !== "bold" ? 1.0 : 0 // Not using visible to allow smooth transition - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } z: 4 + opacity: Config.options.background.clock.cookie.minuteHandStyle !== "bold" ? 1.0 : 0 color: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? root.colBackground : root.colMinuteHand anchors.centerIn: parent implicitWidth: centerDotSize implicitHeight: implicitWidth radius: implicitWidth / 2 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } } // Center glow Rectangle { - opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 // Not using visible to allow smooth transition - Behavior on opacity { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitWidth { // Not using two animations because it looks weird - ParallelAnimation { - NumberAnimation { properties: "implicitWidth,implicitHeight"; duration: 100; easing.type: Easing.InOutQuad } - } - } + opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 z: 0 color: root.colTimeIndicators anchors.centerIn: parent implicitWidth: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 implicitHeight: implicitWidth radius: implicitWidth / 2 + Behavior on opacity { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitWidth { // Not using two animations (one for width and one for height) because it looks weird + ParallelAnimation { + NumberAnimation { properties: "implicitWidth,implicitHeight"; duration: 100; easing.type: Easing.InOutQuad } + } + } } @@ -294,16 +288,19 @@ Item { id: secondHand z: Config.options.background.clock.cookie.secondHandStyle === "line" ? 2 : 3 opacity: Config.options.background.clock.cookie.secondHandStyle === "dot" || Config.options.background.clock.cookie.secondHandStyle === "line" ? 1.0 : 0 // Not using visible to allow smooth transition + rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand + anchors.fill: parent Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } Behavior on rotation{ animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand - anchors.fill: parent Rectangle { - + implicitWidth: Config.options.background.clock.cookie.secondHandStyle === "dot" ? root.secondDotSize : root.secondsHandLength + implicitHeight: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth : root.secondsHandWidth + radius: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth / 2 : root.secondsHandWidth / 2 + color: colSeconds Behavior on implicitHeight { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } @@ -315,10 +312,6 @@ Item { verticalCenter: parent.verticalCenter leftMargin: 10 } - implicitWidth: Config.options.background.clock.cookie.secondHandStyle === "dot" ? root.secondDotSize : root.secondsHandLength - implicitHeight: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth : root.secondsHandWidth - radius: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth / 2 : root.secondsHandWidth / 2 - color: colSeconds } } @@ -329,7 +322,6 @@ Item { height: cookie.height rotation: secondHand.rotation + 45 // +45 degrees to align with minute hand opacity: Config.options.background.clock.cookie.dateStyle === "rotating" ? 1.0 : 0 - Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } @@ -367,17 +359,16 @@ Item { z: 1 implicitWidth: 45 implicitHeight: Config.options.background.clock.cookie.dateStyle === "square" ? 30 : 0 - Behavior on implicitHeight{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - opacity: 1.0 + color: root.colOnBackground + radius: Appearance.rounding.small anchors{ verticalCenter: cookie.verticalCenter right: cookie.right rightMargin: 10 } - color: root.colOnBackground - radius: Appearance.rounding.small // LOOK + Behavior on implicitHeight{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } StyledText{ opacity: Config.options.background.clock.cookie.dateStyle === "square" ? 1.0 : 0 Behavior on opacity{ @@ -398,14 +389,17 @@ Item { Repeater { model: 4 Item { - opacity: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 1.0 : 0 // Not using visible to allow smooth transition + required property int index + opacity: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 1.0 : 0 + rotation: 360 / 4 * index + anchors.fill: parent Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - required property int index - rotation: 360 / 4 * index - anchors.fill: parent Rectangle { + color: "transparent" + implicitWidth: root.hourNumberSize + implicitHeight: implicitWidth anchors { left: parent.left verticalCenter: parent.verticalCenter @@ -414,14 +408,12 @@ Item { Behavior on anchors.leftMargin{ animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - implicitWidth: root.hourNumberSize - implicitHeight: implicitWidth - color: "transparent" StyledText{ - color: root.colOnBackground anchors.centerIn: parent - text: index === 0 ? "9" : index === 1 ? "12" : index === 2 ? "3" : "6" + text: index === 0 ? "9" : + index === 1 ? "12" : + index === 2 ? "3" : "6" rotation: index % 2 === 0 ? index * 90 : -index * 90 //A better way can be found to show texts on right angle font { family: Appearance.font.family.reading @@ -437,14 +429,18 @@ Item { Repeater { model: 12 Item { + required property int index + rotation: 360 / 12 * index + anchors.fill: parent opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - required property int index - rotation: 360 / 12 * index - anchors.fill: parent Rectangle { + implicitWidth: root.hourLineSize * 3.5 + implicitHeight: root.hourLineSize + radius: implicitWidth / 2 + color: root.colOnBackground anchors { left: parent.left verticalCenter: parent.verticalCenter @@ -453,11 +449,6 @@ Item { Behavior on anchors.leftMargin{ animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - implicitWidth: root.hourLineSize * 3.5 - implicitHeight: root.hourLineSize - radius: implicitWidth / 2 - color: root.colOnBackground - opacity: 1.0 } } } @@ -465,14 +456,19 @@ Item { Repeater { model: 60 Item { + required property int index + rotation: 360 / 60 * index + anchors.fill: parent opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - required property int index - rotation: 360 / 60 * index - anchors.fill: parent Rectangle { + implicitWidth: root.minuteLineSize * 3.5 + implicitHeight: root.minuteLineSize + radius: implicitWidth / 2 + color: root.colOnBackground + opacity: 0.5 anchors { left: parent.left verticalCenter: parent.verticalCenter @@ -481,11 +477,6 @@ Item { Behavior on anchors.leftMargin{ animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - implicitWidth: root.minuteLineSize * 3.5 - implicitHeight: root.minuteLineSize - radius: implicitWidth / 2 - color: root.colOnBackground - opacity: 0.5 } } } diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index cfd38cc50..10f688520 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -131,11 +131,11 @@ Singleton { property real scale: 1 property int clockSides: 12 property JsonObject cookie: JsonObject { - property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" - property string hourHandStyle: "fill" // Options: "fill", "stroke" + property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" + property string hourHandStyle: "fill" // Options: "fill", "stroke" property string minuteHandStyle: "medium" // Options: "medium", "bold" - property string secondHandStyle: "dot" // Options: "dot", "line" , "none" - property string dateStyle: "rotating" // Options: "rotating", "square", "none" + property string secondHandStyle: "dot" // Options: "dot", "line" , "none" + property string dateStyle: "rotating" // Options: "rotating", "square", "none" property bool timeIndicators: true property bool centerGlow: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 20aed3474..0e78e5251 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -205,28 +205,28 @@ ContentPage { } ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Hour hand style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.hourHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.hourHandStyle = newValue; - } - options: [ - { - displayName: Translation.tr("Fill"), - icon: "stroke_full", - value: "fill" - }, - { - displayName: Translation.tr("Stroke"), - icon: "stroke_partial", - value: "stroke" - } - ] + enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Hour hand style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.hourHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.hourHandStyle = newValue; } + options: [ + { + displayName: Translation.tr("Fill"), + icon: "stroke_full", + value: "fill" + }, + { + displayName: Translation.tr("Stroke"), + icon: "stroke_partial", + value: "stroke" + } + ] } + } ConfigSpinBox { enabled: Config.options.background.clock.style === "cookie" @@ -241,6 +241,7 @@ ContentPage { Config.options.background.clock.clockSides = value; } } + ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie" From 19d063c3e925d0a84221382624f881c7832cd844 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 17:17:21 +0300 Subject: [PATCH 028/125] fix second dot/hand animation --- .config/quickshell/ii/modules/background/CookieClock.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index c7c927fa0..d39877b72 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -298,7 +298,7 @@ Item { } Rectangle { implicitWidth: Config.options.background.clock.cookie.secondHandStyle === "dot" ? root.secondDotSize : root.secondsHandLength - implicitHeight: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth : root.secondsHandWidth + implicitHeight: Config.options.background.clock.cookie.secondHandStyle === "dot" ? root.secondDotSize : root.secondsHandWidth radius: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth / 2 : root.secondsHandWidth / 2 color: colSeconds Behavior on implicitHeight { @@ -307,6 +307,7 @@ Item { Behavior on implicitWidth { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } + anchors { left: parent.left verticalCenter: parent.verticalCenter From 3f9459a07ef2489ab60985cbf25a2b2acef28c92 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 17:19:49 +0300 Subject: [PATCH 029/125] fix centerGlow animation --- .../quickshell/ii/modules/background/CookieClock.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index d39877b72..56c812a6b 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -270,15 +270,16 @@ Item { color: root.colTimeIndicators anchors.centerIn: parent implicitWidth: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 - implicitHeight: implicitWidth + implicitHeight: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 // Not using implicitHeight to allow smooth transition radius: implicitWidth / 2 Behavior on opacity { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - Behavior on implicitWidth { // Not using two animations (one for width and one for height) because it looks weird - ParallelAnimation { - NumberAnimation { properties: "implicitWidth,implicitHeight"; duration: 100; easing.type: Easing.InOutQuad } - } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } } @@ -307,7 +308,6 @@ Item { Behavior on implicitWidth { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - anchors { left: parent.left verticalCenter: parent.verticalCenter From 8bd4bbe7ea795951e4d489e7d97357173a68ef7d Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 19:24:29 +0300 Subject: [PATCH 030/125] add ability to hide minute and hour hand --- .../quickshell/ii/modules/background/CookieClock.qml | 3 +++ .config/quickshell/ii/modules/common/Config.qml | 4 ++-- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 56c812a6b..bdb29ca28 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -198,6 +198,7 @@ Item { // Hour hand Item { + visible: Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true anchors.fill: parent z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) @@ -230,6 +231,7 @@ Item { // Minute hand Item { + visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? false : true anchors.fill: parent z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3 rotation: -90 + (360 / 60) * root.clockMinute @@ -251,6 +253,7 @@ Item { // Center dot Rectangle { + visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" && Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true z: 4 opacity: Config.options.background.clock.cookie.minuteHandStyle !== "bold" ? 1.0 : 0 color: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? root.colBackground : root.colMinuteHand diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 10f688520..5b217faa0 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -132,8 +132,8 @@ Singleton { property int clockSides: 12 property JsonObject cookie: JsonObject { property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" - property string hourHandStyle: "fill" // Options: "fill", "stroke" - property string minuteHandStyle: "medium" // Options: "medium", "bold" + property string hourHandStyle: "fill" // Options: "fill", "stroke", "hide" + property string minuteHandStyle: "medium" // Options: "medium", "bold", "hide" property string secondHandStyle: "dot" // Options: "dot", "line" , "none" property string dateStyle: "rotating" // Options: "rotating", "square", "none" property bool timeIndicators: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 0e78e5251..3d7c7bd16 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -170,6 +170,11 @@ ContentPage { displayName: Translation.tr("Bold"), icon: "pen_size_5", value: "bold" + }, + { + displayName: Translation.tr("Hide"), + icon: "hide_image", + value: "hide" } ] } @@ -223,6 +228,11 @@ ContentPage { displayName: Translation.tr("Stroke"), icon: "stroke_partial", value: "stroke" + }, + { + displayName: Translation.tr("Hide"), + icon: "hide_image", + value: "hide" } ] } From 692172d57b4eb941b6570b1909294be0f4e56918 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 20:02:20 +0300 Subject: [PATCH 031/125] new classic hand style , settings layout change (are there any better ways?) --- .../ii/modules/background/CookieClock.qml | 53 ++++---- .../quickshell/ii/modules/common/Config.qml | 4 +- .../ii/modules/settings/InterfaceConfig.qml | 119 ++++++++++-------- 3 files changed, 104 insertions(+), 72 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index bdb29ca28..f56787395 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -202,30 +202,22 @@ Item { anchors.fill: parent z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) - // Using two different rectangle for animation. Can be used only one with border.color && border.width Rectangle { - // fill - opacity: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 1.0 : 0 + opacity: Config.options.background.clock.cookie.hourHandStyle !== "hide" ? 1.0 : 0 anchors.verticalCenter: parent.verticalCenter - x: parent.width / 2 - hourHandWidth / 2 + x: Config.options.background.clock.cookie.hourHandStyle === "classic" ? (parent.width / 2 - minuteHandWidth / 2) - 15 : parent.width / 2 - minuteHandWidth / 2 width: hourHandLength - height: hourHandWidth - radius: hourHandWidth / 2 - color : root.colHourHand + height: Config.options.background.clock.cookie.hourHandStyle === "classic" ? 8 : hourHandWidth + radius: Config.options.background.clock.cookie.hourHandStyle === "classic" ? 2 : hourHandWidth / 2 + color : Config.options.background.clock.cookie.hourHandStyle === "stroke" ? "transparent" : root.colHourHand + border.color: root.colHourHand + border.width: 4 Behavior on opacity { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - } - Rectangle { - // border - anchors.verticalCenter: parent.verticalCenter - x: parent.width / 2 - hourHandWidth / 2 - width: hourHandLength - height: hourHandWidth - radius: hourHandWidth / 2 - color: "transparent" - border.color: root.colHourHand - border.width: 4 + Behavior on x{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } } } @@ -240,14 +232,17 @@ Item { } Rectangle { anchors.verticalCenter: parent.verticalCenter - x: parent.width / 2 - minuteHandWidth / 2 + x: Config.options.background.clock.cookie.minuteHandStyle === "classic" ? (parent.width / 2 - minuteHandWidth / 2) - 15 : parent.width / 2 - minuteHandWidth / 2 width: minuteHandLength height: minuteHandWidth - radius: minuteHandWidth / 2 + radius: Config.options.background.clock.cookie.minuteHandStyle === "classic" ? 2 : minuteHandWidth / 2 color: root.colMinuteHand Behavior on height { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } + Behavior on x{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } } } @@ -291,7 +286,7 @@ Item { Item { id: secondHand z: Config.options.background.clock.cookie.secondHandStyle === "line" ? 2 : 3 - opacity: Config.options.background.clock.cookie.secondHandStyle === "dot" || Config.options.background.clock.cookie.secondHandStyle === "line" ? 1.0 : 0 // Not using visible to allow smooth transition + opacity: Config.options.background.clock.cookie.secondHandStyle !== "hide" ? 1.0 : 0 rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand anchors.fill: parent Behavior on opacity { @@ -317,6 +312,22 @@ Item { leftMargin: 10 } } + Rectangle{ + // Dot on the classic style + opacity: Config.options.background.clock.cookie.secondHandStyle === "classic" ? 1.0 : 0.0 + implicitHeight: 14 + implicitWidth: 14 + color: root.colSeconds + radius: Appearance.rounding.small + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: 40 + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } } // Date (the rotating one with the second hand) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 5b217faa0..d3ec64980 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -132,8 +132,8 @@ Singleton { property int clockSides: 12 property JsonObject cookie: JsonObject { property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" - property string hourHandStyle: "fill" // Options: "fill", "stroke", "hide" - property string minuteHandStyle: "medium" // Options: "medium", "bold", "hide" + property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" + property string minuteHandStyle: "medium" // Options: "classic", "thin", "medium", "bold", "hide" property string secondHandStyle: "dot" // Options: "dot", "line" , "none" property string dateStyle: "rotating" // Options: "rotating", "square", "none" property bool timeIndicators: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 3d7c7bd16..454456a4f 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -115,37 +115,44 @@ ContentPage { ] } } + + } + + ContentSubsection { enabled: Config.options.background.clock.style === "cookie" - title: Translation.tr("Seconds indicator style") visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Hour hand style") ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.secondHandStyle + currentValue: Config.options.background.clock.cookie.hourHandStyle onSelected: newValue => { - Config.options.background.clock.cookie.secondHandStyle = newValue; + Config.options.background.clock.cookie.hourHandStyle = newValue; } options: [ { - displayName: Translation.tr("None"), + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, + { + displayName: Translation.tr("Fill"), + icon: "stroke_full", + value: "fill" + }, + { + displayName: Translation.tr("Stroke"), + icon: "stroke_partial", + value: "stroke" + }, + { + displayName: Translation.tr("Hide"), icon: "deselect", - value: "none" - }, - { - displayName: Translation.tr("Dot"), - icon: "adjust", - value: "dot" - }, - { - displayName: Translation.tr("Line"), - icon: "line_end", - value: "line" + value: "hide" } ] } } - } - - ConfigRow{ + ContentSubsection { enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie" @@ -156,6 +163,11 @@ ContentPage { Config.options.background.clock.cookie.minuteHandStyle = newValue; } options: [ + { + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, { displayName: Translation.tr("Thin"), icon: "pen_size_1", @@ -173,12 +185,50 @@ ContentPage { }, { displayName: Translation.tr("Hide"), - icon: "hide_image", + icon: "deselect", value: "hide" } ] } } + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + title: Translation.tr("Seconds hand style") + visible: Config.options.background.clock.style === "cookie" + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.secondHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.secondHandStyle = newValue; + } + options: [ + { + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, + { + displayName: Translation.tr("Line"), + icon: "line_end", + value: "line" + }, + { + displayName: Translation.tr("Dot"), + icon: "adjust", + value: "dot" + }, + { + displayName: Translation.tr("Hide"), + icon: "deselect", + value: "hide" + } + + ] + } + } + + + + ContentSubsection { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "none" visible: Config.options.background.clock.style === "cookie" @@ -207,36 +257,7 @@ ContentPage { ] } } - } - - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Hour hand style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.hourHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.hourHandStyle = newValue; - } - options: [ - { - displayName: Translation.tr("Fill"), - icon: "stroke_full", - value: "fill" - }, - { - displayName: Translation.tr("Stroke"), - icon: "stroke_partial", - value: "stroke" - }, - { - displayName: Translation.tr("Hide"), - icon: "hide_image", - value: "hide" - } - ] - } - } + ConfigSpinBox { enabled: Config.options.background.clock.style === "cookie" From 02631da9f16200fa71cc9f2cc81e6b2bcaf0d017 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 20:07:03 +0300 Subject: [PATCH 032/125] add hiding animation to hands --- .../quickshell/ii/modules/background/CookieClock.qml | 10 ++++++++-- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 10 +++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index f56787395..ae812ee21 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -198,10 +198,13 @@ Item { // Hour hand Item { - visible: Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true + opacity: Config.options.background.clock.cookie.hourHandStyle === "hide" ? 0.0 : 1.0 anchors.fill: parent z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } Rectangle { opacity: Config.options.background.clock.cookie.hourHandStyle !== "hide" ? 1.0 : 0 anchors.verticalCenter: parent.verticalCenter @@ -223,13 +226,16 @@ Item { // Minute hand Item { - visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? false : true + opacity: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? 0.0 : 1.0 anchors.fill: parent z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3 rotation: -90 + (360 / 60) * root.clockMinute Behavior on rotation{ animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } + Behavior on opacity { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } Rectangle { anchors.verticalCenter: parent.verticalCenter x: Config.options.background.clock.cookie.minuteHandStyle === "classic" ? (parent.width / 2 - minuteHandWidth / 2) - 15 : parent.width / 2 - minuteHandWidth / 2 diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 454456a4f..6cf2f5093 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -134,16 +134,16 @@ ContentPage { icon: "radio", value: "classic" }, - { - displayName: Translation.tr("Fill"), - icon: "stroke_full", - value: "fill" - }, { displayName: Translation.tr("Stroke"), icon: "stroke_partial", value: "stroke" }, + { + displayName: Translation.tr("Fill"), + icon: "stroke_full", + value: "fill" + }, { displayName: Translation.tr("Hide"), icon: "deselect", From 79ac51a1ca1edc0cd8de72edf0d83b4dcc963a96 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 20:35:24 +0300 Subject: [PATCH 033/125] add new date style (bubble) --- .../ii/modules/background/CookieClock.qml | 71 ++++++++++++++++++- .../quickshell/ii/modules/common/Config.qml | 2 +- .../ii/modules/settings/InterfaceConfig.qml | 5 ++ 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index ae812ee21..4a489921c 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -31,9 +31,8 @@ Item { property real secondsHandLength: 100 property real hourLineSize: 5 property real minuteLineSize: 2 - property real hourNumberSize: 36 - + property real dateSquareSize: 64 property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer @@ -405,6 +404,74 @@ Item { } } } + + // Date bubble style left side + Rectangle{ + z: 5 + implicitWidth: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 + implicitHeight: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 + color: Appearance.colors.colPrimaryContainerHover + radius: Appearance.rounding.large + anchors{ + left: cookie.left + bottom: cookie.bottom + bottomMargin: 5 + } + Behavior on implicitWidth{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitHeight{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + StyledText{ + anchors.centerIn: parent + text: DateTime.date.substring(5,7) + color: Appearance.colors.colPrimary + opacity: Config.options.background.clock.cookie.dateStyle === "bubble" ? 1.0 : 0 + font { + family: Appearance.font.family.reading + pixelSize: 30 + weight: 1000 + } + Behavior on opacity{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } + + // Date bubble style right side + Rectangle{ + z: 5 + implicitWidth: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 + implicitHeight: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 + color: Appearance.colors.colTertiaryContainer + radius: Appearance.rounding.verylarge + anchors{ + right: cookie.right + top: cookie.top + topMargin: 5 + } + Behavior on implicitWidth{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitHeight{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + StyledText{ + anchors.centerIn: parent + text: DateTime.date.substring(8,10) + color: Appearance.colors.colTertiary + opacity: Config.options.background.clock.cookie.dateStyle === "bubble" ? 1.0 : 0 + font { + family: Appearance.font.family.reading + pixelSize: 30 + weight: 1000 + } + Behavior on opacity{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } // Hour Indicator numbers (3-6-9-12) Repeater { diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index d3ec64980..72c9a6d5d 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -135,7 +135,7 @@ Singleton { property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" property string minuteHandStyle: "medium" // Options: "classic", "thin", "medium", "bold", "hide" property string secondHandStyle: "dot" // Options: "dot", "line" , "none" - property string dateStyle: "rotating" // Options: "rotating", "square", "none" + property string dateStyle: "rotating" // Options: "rotating", "square", "bubble" , "none" property bool timeIndicators: true property bool centerGlow: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 6cf2f5093..8160d962c 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -253,6 +253,11 @@ ContentPage { displayName: Translation.tr("Square"), icon: "square", value: "square" + }, + { + displayName: Translation.tr("Bubble"), + icon: "bubble_chart", + value: "bubble" } ] } From fedeb47dbc5fd841cc7e8f6267180a0d0c5818e9 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 20:46:28 +0300 Subject: [PATCH 034/125] make bubble date style work with others --- .../ii/modules/settings/InterfaceConfig.qml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 8160d962c..d9d1ada3c 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -87,7 +87,9 @@ ContentPage { } if (newValue != "none"){ Config.options.background.clock.cookie.dateInClock = false; - Config.options.background.clock.cookie.dateStyle = "none"; + if (Config.options.background.clock.cookie.dateStyle !== "bubble"){ + Config.options.background.clock.cookie.dateStyle = "none"; + } } } options: [ @@ -230,13 +232,18 @@ ContentPage { ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "none" + enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie" title: Translation.tr("Date style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.dateStyle onSelected: newValue => { - Config.options.background.clock.cookie.dateStyle = newValue; + if (newValue !== "bubble" && Config.options.background.clock.cookie.dialNumberStyle === "none"){ + Config.options.background.clock.cookie.dateStyle = newValue; + } + if (newValue === "bubble" || newValue === "none"){ + Config.options.background.clock.cookie.dateStyle = newValue; + } } options: [ { From fba3a54f82faf3a4faf0987c862905ebfe1d6a36 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 20:51:02 +0300 Subject: [PATCH 035/125] add a note to date styles --- .../ii/modules/settings/InterfaceConfig.qml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index d9d1ada3c..325fbeb4f 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -251,6 +251,11 @@ ContentPage { icon: "deselect", value: "none" }, + { + displayName: Translation.tr("Bubble"), + icon: "bubble_chart", + value: "bubble" + }, { displayName: Translation.tr("Rotating"), icon: "rotate_right", @@ -260,15 +265,16 @@ ContentPage { displayName: Translation.tr("Square"), icon: "square", value: "square" - }, - { - displayName: Translation.tr("Bubble"), - icon: "bubble_chart", - value: "bubble" } ] } } + StyledText { + Layout.leftMargin: 10 + color: Appearance.colors.colSubtext + font.pixelSize: Appearance.font.pixelSize.smallie + text: Translation.tr("'Rotating' and 'Square' styles are not compatible with dial styles for aesthetic reasons") + } ConfigSpinBox { From f99c390a76964038da4d42f64f2709a988be11db Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 20:57:08 +0300 Subject: [PATCH 036/125] fix note being visible on digital clock --- .config/quickshell/ii/modules/settings/InterfaceConfig.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 325fbeb4f..63aadfd04 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -270,6 +270,7 @@ ContentPage { } } StyledText { + visible: Config.options.background.clock.style === "cookie" Layout.leftMargin: 10 color: Appearance.colors.colSubtext font.pixelSize: Appearance.font.pixelSize.smallie From 96ed90e2ccdfdda7a6df52565ee22726a3e3e9ae Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:14:57 +0200 Subject: [PATCH 037/125] add time second precision config option --- .../quickshell/ii/modules/common/Config.qml | 1 + .config/quickshell/ii/services/DateTime.qml | 38 +++++++++++-------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 72c9a6d5d..d7cb2f895 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -373,6 +373,7 @@ Singleton { property int focus: 1500 property int longBreak: 900 } + property bool secondPrecision: false } property JsonObject wallpaperSelector: JsonObject { diff --git a/.config/quickshell/ii/services/DateTime.qml b/.config/quickshell/ii/services/DateTime.qml index 69bfb457f..62d296dbc 100644 --- a/.config/quickshell/ii/services/DateTime.qml +++ b/.config/quickshell/ii/services/DateTime.qml @@ -1,10 +1,10 @@ +pragma Singleton +pragma ComponentBehavior: Bound import qs import qs.modules.common import QtQuick import Quickshell import Quickshell.Io -pragma Singleton -pragma ComponentBehavior: Bound /** * A nice wrapper for date and time strings. @@ -12,7 +12,11 @@ pragma ComponentBehavior: Bound Singleton { property var clock: SystemClock { id: clock - precision: GlobalStates.screenLocked ? SystemClock.Seconds : SystemClock.Minutes // Hack to ensure clock is correct after waking up from suspend + precision: { + if (Config.options.time.secondPrecision || GlobalStates.screenLocked) + return SystemClock.Seconds; + return SystemClock.Minutes; + } } property string time: Qt.locale().toString(clock.date, Config.options?.time.format ?? "hh:mm") property string shortDate: Qt.locale().toString(clock.date, Config.options?.time.shortDateFormat ?? "dd/MM") @@ -25,22 +29,25 @@ Singleton { running: true repeat: true onTriggered: { - fileUptime.reload() - const textUptime = fileUptime.text() - const uptimeSeconds = Number(textUptime.split(" ")[0] ?? 0) + fileUptime.reload(); + const textUptime = fileUptime.text(); + const uptimeSeconds = Number(textUptime.split(" ")[0] ?? 0); // Convert seconds to days, hours, and minutes - const days = Math.floor(uptimeSeconds / 86400) - const hours = Math.floor((uptimeSeconds % 86400) / 3600) - const minutes = Math.floor((uptimeSeconds % 3600) / 60) + const days = Math.floor(uptimeSeconds / 86400); + const hours = Math.floor((uptimeSeconds % 86400) / 3600); + const minutes = Math.floor((uptimeSeconds % 3600) / 60); // Build the formatted uptime string - let formatted = "" - if (days > 0) formatted += `${days}d` - if (hours > 0) formatted += `${formatted ? ", " : ""}${hours}h` - if (minutes > 0 || !formatted) formatted += `${formatted ? ", " : ""}${minutes}m` - uptime = formatted - interval = Config.options?.resources?.updateInterval ?? 3000 + let formatted = ""; + if (days > 0) + formatted += `${days}d`; + if (hours > 0) + formatted += `${formatted ? ", " : ""}${hours}h`; + if (minutes > 0 || !formatted) + formatted += `${formatted ? ", " : ""}${minutes}m`; + uptime = formatted; + interval = Config.options?.resources?.updateInterval ?? 3000; } } @@ -49,5 +56,4 @@ Singleton { path: "/proc/uptime" } - } From 9d3941714241bc60dc47983bdd9f93995f9f554d Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:19:36 +0200 Subject: [PATCH 038/125] rename waveAnimation to constantlyRotate, disable by default --- .config/quickshell/ii/modules/background/CookieClock.qml | 2 +- .config/quickshell/ii/modules/common/Config.qml | 2 +- .../ii/modules/common/widgets/MaterialCookie.qml | 7 +++---- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 8 ++++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 4a489921c..cf31f21bf 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -94,7 +94,7 @@ Item { amplitude: implicitSize / 70 sides: Config.options.background.clock.clockSides color: root.colBackground - waveAnimation: Config.options.background.clock.cookie.waveAnimation + constantlyRotate: Config.options.background.clock.cookie.constantlyRotate } // Hour dots dial style diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index d7cb2f895..a27f44565 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -139,7 +139,7 @@ Singleton { property bool timeIndicators: true property bool centerGlow: true property bool dateInClock: true - property bool waveAnimation: true + property bool constantlyRotate: false } } diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 15fb66d44..268694862 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -14,15 +14,14 @@ Item { property int renderPoints: 360 property color color: "#605790" property alias strokeWidth: shapePath.strokeWidth - property bool waveAnimation: false - + property bool constantlyRotate: false implicitWidth: implicitSize implicitHeight: implicitSize property real waveTime: 0 Loader{ - active: waveAnimation + active: constantlyRotate sourceComponent: Timer{ interval: 16 // Does it effect performance, probably, is it noticeable, not really running: true; repeat: true @@ -60,7 +59,7 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var wave = waveAnimation ? Math.sin(angle * root.animatedSides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.animatedSides + Math.PI/2) * root.amplitude + var wave = constantlyRotate ? Math.sin(angle * root.animatedSides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.animatedSides + Math.PI/2) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy points.push(Qt.point(x, y)) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 63aadfd04..2ae96628c 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -296,13 +296,13 @@ ContentPage { enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie" buttonIcon: "waves" - text: Translation.tr("Wave animation") - checked: Config.options.background.clock.cookie.waveAnimation + text: Translation.tr("Constantly rotate") + checked: Config.options.background.clock.cookie.constantlyRotate onCheckedChanged: { - Config.options.background.clock.cookie.waveAnimation = checked; + Config.options.background.clock.cookie.constantlyRotate = checked; } StyledToolTip { - text: "It may effect performance" + text: "Makes the clock always rotate. This is extremely expensive (expect 50% usage on Intel UHD Graphics) and thus impractical." } } From 33fdc1cdc7725ac63b5487463d1ca4a958e609c8 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 21:27:01 +0300 Subject: [PATCH 039/125] set showQuote false by default --- .config/quickshell/ii/modules/common/Config.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index a27f44565..484f86643 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -146,7 +146,7 @@ Singleton { property string wallpaperPath: "" property string thumbnailPath: "" property string quote: "" - property bool showQuote: true + property bool showQuote: false property bool hideWhenFullscreen: true property JsonObject parallax: JsonObject { property bool vertical: false From f88535146449d5763ac3c779fe2b4067d101c2d9 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 21:33:19 +0300 Subject: [PATCH 040/125] remove animatedSides, use frameAnimation --- .../modules/common/widgets/MaterialCookie.qml | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 268694862..c59e53613 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -7,8 +7,7 @@ import qs.modules.common Item { id: root - property int sides: 12 - property real animatedSides: 12 + property int sides: 12 property int implicitSize: 100 property real amplitude: implicitSize / 50 property int renderPoints: 360 @@ -19,25 +18,19 @@ Item { implicitWidth: implicitSize implicitHeight: implicitSize - property real waveTime: 0 + property real shapeRotation: 0 + + Loader{ active: constantlyRotate - sourceComponent: Timer{ - interval: 16 // Does it effect performance, probably, is it noticeable, not really - running: true; repeat: true + sourceComponent: FrameAnimation{ + running: true onTriggered: { - root.waveTime += 0.05 + shapeRotation += 0.05 } } } - onSidesChanged: NumberAnimation { - target: root - property: "animatedSides" - to: root.sides - duration: 100 - easing.type: Easing.InOutQuad - } Shape { id: shape @@ -59,7 +52,7 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var wave = constantlyRotate ? Math.sin(angle * root.animatedSides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.animatedSides + Math.PI/2) * root.amplitude + var wave = constantlyRotate ? Math.sin(angle * root.sides + Math.PI/2 - root.shapeRotation) * root.amplitude : Math.sin(angle * root.shapeRotation + Math.PI/2) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy points.push(Qt.point(x, y)) From 20e1fa935a0cd48f46553b3207df580177990edc Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 21:34:33 +0300 Subject: [PATCH 041/125] remove visible's in config --- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 2ae96628c..d7c6468d3 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -71,7 +71,6 @@ ContentPage { ConfigRow{ - visible: Config.options.background.clock.style === "cookie" ContentSubsection { enabled: Config.options.background.clock.style === "cookie" title: Translation.tr("Dial number style") @@ -123,7 +122,6 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" title: Translation.tr("Hour hand style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.hourHandStyle @@ -157,7 +155,6 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" title: Translation.tr("Minute hand style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.minuteHandStyle @@ -196,7 +193,6 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" title: Translation.tr("Seconds hand style") - visible: Config.options.background.clock.style === "cookie" ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.secondHandStyle onSelected: newValue => { @@ -233,7 +229,6 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" title: Translation.tr("Date style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.dateStyle @@ -270,7 +265,6 @@ ContentPage { } } StyledText { - visible: Config.options.background.clock.style === "cookie" Layout.leftMargin: 10 color: Appearance.colors.colSubtext font.pixelSize: Appearance.font.pixelSize.smallie @@ -280,7 +274,6 @@ ContentPage { ConfigSpinBox { enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" icon: "support" text: Translation.tr("Clock sides") value: Config.options.background.clock.clockSides @@ -294,7 +287,6 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" buttonIcon: "waves" text: Translation.tr("Constantly rotate") checked: Config.options.background.clock.cookie.constantlyRotate @@ -308,7 +300,6 @@ ContentPage { ConfigRow{ enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" buttonIcon: "brightness_7" @@ -327,7 +318,6 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" - visible: Config.options.background.clock.style === "cookie" buttonIcon: "farsight_digital" text: Translation.tr("Clock indicator") checked: Config.options.background.clock.cookie.timeIndicators From d95147712b1e02e160d5196cf2fd83c441ea4f09 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 21:36:42 +0300 Subject: [PATCH 042/125] readd visible's correctly --- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index d7c6468d3..aaf0ee522 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -71,6 +71,7 @@ ContentPage { ConfigRow{ + visible: Config.options.background.clock.style === "cookie" ContentSubsection { enabled: Config.options.background.clock.style === "cookie" title: Translation.tr("Dial number style") @@ -122,6 +123,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" + visible: enabled title: Translation.tr("Hour hand style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.hourHandStyle @@ -155,6 +157,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" + visible: enabled title: Translation.tr("Minute hand style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.minuteHandStyle @@ -192,6 +195,7 @@ ContentPage { } ContentSubsection { enabled: Config.options.background.clock.style === "cookie" + visible: enabled title: Translation.tr("Seconds hand style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.secondHandStyle @@ -229,6 +233,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" + visible: enabled title: Translation.tr("Date style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.dateStyle @@ -265,6 +270,7 @@ ContentPage { } } StyledText { + visible: Config.options.background.clock.style === "cookie" Layout.leftMargin: 10 color: Appearance.colors.colSubtext font.pixelSize: Appearance.font.pixelSize.smallie @@ -274,6 +280,7 @@ ContentPage { ConfigSpinBox { enabled: Config.options.background.clock.style === "cookie" + visible: enabled icon: "support" text: Translation.tr("Clock sides") value: Config.options.background.clock.clockSides @@ -287,6 +294,7 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" + visible: enabled buttonIcon: "waves" text: Translation.tr("Constantly rotate") checked: Config.options.background.clock.cookie.constantlyRotate @@ -300,6 +308,7 @@ ContentPage { ConfigRow{ enabled: Config.options.background.clock.style === "cookie" + visible: enabled ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" buttonIcon: "brightness_7" @@ -318,6 +327,7 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" + visible: Config.options.background.clock.style === "cookie" buttonIcon: "farsight_digital" text: Translation.tr("Clock indicator") checked: Config.options.background.clock.cookie.timeIndicators From 865e8575b24e97a95d4ef64136015305300dbd49 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:37:15 +0200 Subject: [PATCH 043/125] Revert "remove visible's in config" This reverts commit 20e1fa935a0cd48f46553b3207df580177990edc. --- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index d7c6468d3..2ae96628c 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -71,6 +71,7 @@ ContentPage { ConfigRow{ + visible: Config.options.background.clock.style === "cookie" ContentSubsection { enabled: Config.options.background.clock.style === "cookie" title: Translation.tr("Dial number style") @@ -122,6 +123,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" title: Translation.tr("Hour hand style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.hourHandStyle @@ -155,6 +157,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" title: Translation.tr("Minute hand style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.minuteHandStyle @@ -193,6 +196,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" title: Translation.tr("Seconds hand style") + visible: Config.options.background.clock.style === "cookie" ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.secondHandStyle onSelected: newValue => { @@ -229,6 +233,7 @@ ContentPage { ContentSubsection { enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" title: Translation.tr("Date style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.dateStyle @@ -265,6 +270,7 @@ ContentPage { } } StyledText { + visible: Config.options.background.clock.style === "cookie" Layout.leftMargin: 10 color: Appearance.colors.colSubtext font.pixelSize: Appearance.font.pixelSize.smallie @@ -274,6 +280,7 @@ ContentPage { ConfigSpinBox { enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" icon: "support" text: Translation.tr("Clock sides") value: Config.options.background.clock.clockSides @@ -287,6 +294,7 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" buttonIcon: "waves" text: Translation.tr("Constantly rotate") checked: Config.options.background.clock.cookie.constantlyRotate @@ -300,6 +308,7 @@ ContentPage { ConfigRow{ enabled: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" buttonIcon: "brightness_7" @@ -318,6 +327,7 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" + visible: Config.options.background.clock.style === "cookie" buttonIcon: "farsight_digital" text: Translation.tr("Clock indicator") checked: Config.options.background.clock.cookie.timeIndicators From 94fb563a1547ed38f11bf00e8fe60f8e8374d852 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 21:39:51 +0300 Subject: [PATCH 044/125] fix weird gaps and indents in InterfaceConfig --- .../ii/modules/settings/InterfaceConfig.qml | 292 +++++++++--------- 1 file changed, 141 insertions(+), 151 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index aaf0ee522..470774e26 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -43,10 +43,6 @@ ContentPage { } } - - - - ContentSubsection { title: Translation.tr("Clock style") ConfigSelectionArray { @@ -69,7 +65,6 @@ ContentPage { } } - ConfigRow{ visible: Config.options.background.clock.style === "cookie" ContentSubsection { @@ -120,162 +115,157 @@ ContentPage { } - - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: enabled - title: Translation.tr("Hour hand style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.hourHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.hourHandStyle = newValue; - } - options: [ - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Stroke"), - icon: "stroke_partial", - value: "stroke" - }, - { - displayName: Translation.tr("Fill"), - icon: "stroke_full", - value: "fill" - }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } - ] + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + visible: enabled + title: Translation.tr("Hour hand style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.hourHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.hourHandStyle = newValue; } + options: [ + { + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, + { + displayName: Translation.tr("Stroke"), + icon: "stroke_partial", + value: "stroke" + }, + { + displayName: Translation.tr("Fill"), + icon: "stroke_full", + value: "fill" + }, + { + displayName: Translation.tr("Hide"), + icon: "deselect", + value: "hide" + } + ] } + } - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: enabled - title: Translation.tr("Minute hand style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.minuteHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.minuteHandStyle = newValue; - } - options: [ - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Thin"), - icon: "pen_size_1", - value: "thin" - }, - { - displayName: Translation.tr("Medium"), - icon: "pen_size_3", - value: "medium" - }, - { - displayName: Translation.tr("Bold"), - icon: "pen_size_5", - value: "bold" - }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } - ] + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + visible: enabled + title: Translation.tr("Minute hand style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.minuteHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.minuteHandStyle = newValue; } - } - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: enabled - title: Translation.tr("Seconds hand style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.secondHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.secondHandStyle = newValue; + options: [ + { + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, + { + displayName: Translation.tr("Thin"), + icon: "pen_size_1", + value: "thin" + }, + { + displayName: Translation.tr("Medium"), + icon: "pen_size_3", + value: "medium" + }, + { + displayName: Translation.tr("Bold"), + icon: "pen_size_5", + value: "bold" + }, + { + displayName: Translation.tr("Hide"), + icon: "deselect", + value: "hide" } - options: [ - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Line"), - icon: "line_end", - value: "line" - }, - { - displayName: Translation.tr("Dot"), - icon: "adjust", - value: "dot" - }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } - - ] - } + ] } + } + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + visible: enabled + title: Translation.tr("Seconds hand style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.secondHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.secondHandStyle = newValue; + } + options: [ + { + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, + { + displayName: Translation.tr("Line"), + icon: "line_end", + value: "line" + }, + { + displayName: Translation.tr("Dot"), + icon: "adjust", + value: "dot" + }, + { + displayName: Translation.tr("Hide"), + icon: "deselect", + value: "hide" + } + ] + } + } - - - - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: enabled - title: Translation.tr("Date style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.dateStyle - onSelected: newValue => { - if (newValue !== "bubble" && Config.options.background.clock.cookie.dialNumberStyle === "none"){ - Config.options.background.clock.cookie.dateStyle = newValue; - } - if (newValue === "bubble" || newValue === "none"){ - Config.options.background.clock.cookie.dateStyle = newValue; - } + ContentSubsection { + enabled: Config.options.background.clock.style === "cookie" + visible: enabled + title: Translation.tr("Date style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.dateStyle + onSelected: newValue => { + if (newValue !== "bubble" && Config.options.background.clock.cookie.dialNumberStyle === "none"){ + Config.options.background.clock.cookie.dateStyle = newValue; + } + if (newValue === "bubble" || newValue === "none"){ + Config.options.background.clock.cookie.dateStyle = newValue; } - options: [ - { - displayName: Translation.tr("None"), - icon: "deselect", - value: "none" - }, - { - displayName: Translation.tr("Bubble"), - icon: "bubble_chart", - value: "bubble" - }, - { - displayName: Translation.tr("Rotating"), - icon: "rotate_right", - value: "rotating" - }, - { - displayName: Translation.tr("Square"), - icon: "square", - value: "square" - } - ] } + options: [ + { + displayName: Translation.tr("None"), + icon: "deselect", + value: "none" + }, + { + displayName: Translation.tr("Bubble"), + icon: "bubble_chart", + value: "bubble" + }, + { + displayName: Translation.tr("Rotating"), + icon: "rotate_right", + value: "rotating" + }, + { + displayName: Translation.tr("Square"), + icon: "square", + value: "square" + } + ] } - StyledText { - visible: Config.options.background.clock.style === "cookie" - Layout.leftMargin: 10 - color: Appearance.colors.colSubtext - font.pixelSize: Appearance.font.pixelSize.smallie - text: Translation.tr("'Rotating' and 'Square' styles are not compatible with dial styles for aesthetic reasons") - } + } + StyledText { + visible: Config.options.background.clock.style === "cookie" + Layout.leftMargin: 10 + color: Appearance.colors.colSubtext + font.pixelSize: Appearance.font.pixelSize.smallie + text: Translation.tr("'Rotating' and 'Square' styles are not compatible with dial styles for aesthetic reasons") + } ConfigSpinBox { From 5af0fe35dfba0ef877ff6511dfd651a59feb8548 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 21:40:56 +0300 Subject: [PATCH 045/125] change the place of the showQuote --- .../ii/modules/settings/InterfaceConfig.qml | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 470774e26..e1786dcaa 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -12,24 +12,15 @@ ContentPage { icon: "wallpaper" title: Translation.tr("Background") - ConfigRow{ - ConfigSwitch { - buttonIcon: "nest_clock_farsight_analog" - text: Translation.tr("Show clock") - checked: Config.options.background.clock.show - onCheckedChanged: { - Config.options.background.clock.show = checked; - } - } - ConfigSwitch { - buttonIcon: "format_quote" - text: Translation.tr("Show quote") - checked: Config.options.background.showQuote - onCheckedChanged: { - Config.options.background.showQuote = checked; - } + ConfigSwitch { + buttonIcon: "nest_clock_farsight_analog" + text: Translation.tr("Show clock") + checked: Config.options.background.clock.show + onCheckedChanged: { + Config.options.background.clock.show = checked; } } + ConfigSpinBox { icon: "loupe" @@ -337,6 +328,14 @@ ContentPage { ContentSubsection { title: Translation.tr("Quote settings") + ConfigSwitch { + buttonIcon: "format_quote" + text: Translation.tr("Show quote") + checked: Config.options.background.showQuote + onCheckedChanged: { + Config.options.background.showQuote = checked; + } + } MaterialTextArea { Layout.fillWidth: true placeholderText: Translation.tr("Quote") From d276e7b56823623554f3ba1efe7f878ee3849a4b Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:43:13 +0200 Subject: [PATCH 046/125] settings: remove redundant `enabled`s --- .../ii/modules/settings/InterfaceConfig.qml | 413 +++++++++--------- 1 file changed, 196 insertions(+), 217 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 2ae96628c..6390b2c33 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -12,7 +12,7 @@ ContentPage { icon: "wallpaper" title: Translation.tr("Background") - ConfigRow{ + ConfigRow { ConfigSwitch { buttonIcon: "nest_clock_farsight_analog" text: Translation.tr("Show clock") @@ -43,10 +43,6 @@ ContentPage { } } - - - - ContentSubsection { title: Translation.tr("Clock style") ConfigSelectionArray { @@ -69,217 +65,205 @@ ContentPage { } } - - ConfigRow{ + ContentSubsection { visible: Config.options.background.clock.style === "cookie" - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - title: Translation.tr("Dial number style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.dialNumberStyle - onSelected: newValue => { - Config.options.background.clock.cookie.dialNumberStyle = newValue; - if (newValue !== "dots" && newValue !== "full") { - Config.options.background.clock.cookie.centerGlow = false; - } - if (newValue === "numbers") { - Config.options.background.clock.cookie.timeIndicators = false; - } - if (newValue != "none"){ - Config.options.background.clock.cookie.dateInClock = false; - if (Config.options.background.clock.cookie.dateStyle !== "bubble"){ - Config.options.background.clock.cookie.dateStyle = "none"; - } + title: Translation.tr("Dial number style") + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.dialNumberStyle + onSelected: newValue => { + Config.options.background.clock.cookie.dialNumberStyle = newValue; + if (newValue !== "dots" && newValue !== "full") { + Config.options.background.clock.cookie.centerGlow = false; + } + if (newValue === "numbers") { + Config.options.background.clock.cookie.timeIndicators = false; + } + if (newValue != "none") { + Config.options.background.clock.cookie.dateInClock = false; + if (Config.options.background.clock.cookie.dateStyle !== "bubble") { + Config.options.background.clock.cookie.dateStyle = "none"; } } - options: [ - { - displayName: Translation.tr("None"), - icon: "deselect", - value: "none" - }, - { - displayName: Translation.tr("Dots"), - icon: "graph_6", - value: "dots" - }, - { - displayName: Translation.tr("Full"), - icon: "avg_pace", - value: "full" - }, - { - displayName: Translation.tr("Numbers"), - icon: "123", - value: "numbers" - } - - ] } + options: [ + { + displayName: Translation.tr("None"), + icon: "deselect", + value: "none" + }, + { + displayName: Translation.tr("Dots"), + icon: "graph_6", + value: "dots" + }, + { + displayName: Translation.tr("Full"), + icon: "avg_pace", + value: "full" + }, + { + displayName: Translation.tr("Numbers"), + icon: "123", + value: "numbers" + } + ] } - } - - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Hour hand style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.hourHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.hourHandStyle = newValue; - } - options: [ - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Stroke"), - icon: "stroke_partial", - value: "stroke" - }, - { - displayName: Translation.tr("Fill"), - icon: "stroke_full", - value: "fill" - }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } - ] - } - } - - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Minute hand style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.minuteHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.minuteHandStyle = newValue; - } - options: [ - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Thin"), - icon: "pen_size_1", - value: "thin" - }, - { - displayName: Translation.tr("Medium"), - icon: "pen_size_3", - value: "medium" - }, - { - displayName: Translation.tr("Bold"), - icon: "pen_size_5", - value: "bold" - }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } - ] - } - } - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - title: Translation.tr("Seconds hand style") - visible: Config.options.background.clock.style === "cookie" - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.secondHandStyle - onSelected: newValue => { - Config.options.background.clock.cookie.secondHandStyle = newValue; - } - options: [ - { - displayName: Translation.tr("Classic"), - icon: "radio", - value: "classic" - }, - { - displayName: Translation.tr("Line"), - icon: "line_end", - value: "line" - }, - { - displayName: Translation.tr("Dot"), - icon: "adjust", - value: "dot" - }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } + ContentSubsection { + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Hour hand style") - ] + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.hourHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.hourHandStyle = newValue; } - } - - - - - ContentSubsection { - enabled: Config.options.background.clock.style === "cookie" - visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Date style") - ConfigSelectionArray { - currentValue: Config.options.background.clock.cookie.dateStyle - onSelected: newValue => { - if (newValue !== "bubble" && Config.options.background.clock.cookie.dialNumberStyle === "none"){ - Config.options.background.clock.cookie.dateStyle = newValue; - } - if (newValue === "bubble" || newValue === "none"){ - Config.options.background.clock.cookie.dateStyle = newValue; - } + options: [ + { + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, + { + displayName: Translation.tr("Stroke"), + icon: "stroke_partial", + value: "stroke" + }, + { + displayName: Translation.tr("Fill"), + icon: "stroke_full", + value: "fill" + }, + { + displayName: Translation.tr("Hide"), + icon: "deselect", + value: "hide" } - options: [ - { - displayName: Translation.tr("None"), - icon: "deselect", - value: "none" - }, - { - displayName: Translation.tr("Bubble"), - icon: "bubble_chart", - value: "bubble" - }, - { - displayName: Translation.tr("Rotating"), - icon: "rotate_right", - value: "rotating" - }, - { - displayName: Translation.tr("Square"), - icon: "square", - value: "square" - } - ] + ] + } + } + + ContentSubsection { + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Minute hand style") + + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.minuteHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.minuteHandStyle = newValue; } + options: [ + { + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, + { + displayName: Translation.tr("Thin"), + icon: "pen_size_1", + value: "thin" + }, + { + displayName: Translation.tr("Medium"), + icon: "pen_size_3", + value: "medium" + }, + { + displayName: Translation.tr("Bold"), + icon: "pen_size_5", + value: "bold" + }, + { + displayName: Translation.tr("Hide"), + icon: "deselect", + value: "hide" + } + ] } - StyledText { - visible: Config.options.background.clock.style === "cookie" - Layout.leftMargin: 10 - color: Appearance.colors.colSubtext - font.pixelSize: Appearance.font.pixelSize.smallie - text: Translation.tr("'Rotating' and 'Square' styles are not compatible with dial styles for aesthetic reasons") + } + + ContentSubsection { + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Seconds hand style") + + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.secondHandStyle + onSelected: newValue => { + Config.options.background.clock.cookie.secondHandStyle = newValue; + } + options: [ + { + displayName: Translation.tr("Classic"), + icon: "radio", + value: "classic" + }, + { + displayName: Translation.tr("Line"), + icon: "line_end", + value: "line" + }, + { + displayName: Translation.tr("Dot"), + icon: "adjust", + value: "dot" + }, + { + displayName: Translation.tr("Hide"), + icon: "deselect", + value: "hide" + } + ] } - + } + + ContentSubsection { + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Date style") + + ConfigSelectionArray { + currentValue: Config.options.background.clock.cookie.dateStyle + onSelected: newValue => { + if (newValue !== "bubble" && Config.options.background.clock.cookie.dialNumberStyle === "none") { + Config.options.background.clock.cookie.dateStyle = newValue; + } + if (newValue === "bubble" || newValue === "none") { + Config.options.background.clock.cookie.dateStyle = newValue; + } + } + options: [ + { + displayName: Translation.tr("None"), + icon: "deselect", + value: "none" + }, + { + displayName: Translation.tr("Bubble"), + icon: "bubble_chart", + value: "bubble" + }, + { + displayName: Translation.tr("Rotating"), + icon: "rotate_right", + value: "rotating" + }, + { + displayName: Translation.tr("Square"), + icon: "square", + value: "square" + } + ] + } + } + + StyledText { + visible: Config.options.background.clock.style === "cookie" + Layout.leftMargin: 10 + color: Appearance.colors.colSubtext + font.pixelSize: Appearance.font.pixelSize.smallie + } ConfigSpinBox { - enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie" icon: "support" text: Translation.tr("Clock sides") @@ -291,11 +275,10 @@ ContentPage { Config.options.background.clock.clockSides = value; } } - + ConfigSwitch { - enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie" - buttonIcon: "waves" + buttonIcon: "autoplay" text: Translation.tr("Constantly rotate") checked: Config.options.background.clock.cookie.constantlyRotate onCheckedChanged: { @@ -306,16 +289,16 @@ ContentPage { } } - ConfigRow{ - enabled: Config.options.background.clock.style === "cookie" + ConfigRow { visible: Config.options.background.clock.style === "cookie" + ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" buttonIcon: "brightness_7" text: Translation.tr("Center glow") checked: Config.options.background.clock.cookie.centerGlow onEnabledChanged: { - checked = Config.options.background.clock.cookie.centerGlow + checked = Config.options.background.clock.cookie.centerGlow; } onCheckedChanged: { Config.options.background.clock.cookie.centerGlow = checked; @@ -326,13 +309,12 @@ ContentPage { } ConfigSwitch { - enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" - visible: Config.options.background.clock.style === "cookie" + visible: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" buttonIcon: "farsight_digital" text: Translation.tr("Clock indicator") checked: Config.options.background.clock.cookie.timeIndicators onEnabledChanged: { - checked = Config.options.background.clock.cookie.timeIndicators + checked = Config.options.background.clock.cookie.timeIndicators; } onCheckedChanged: { Config.options.background.clock.cookie.timeIndicators = checked; @@ -341,9 +323,7 @@ ContentPage { text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons" } } - } - ContentSubsection { title: Translation.tr("Quote settings") @@ -424,7 +404,9 @@ ContentPage { font.pixelSize: Appearance.font.pixelSize.smallie text: Translation.tr("Press Super+G to toggle appearance") } - Item { Layout.fillWidth: true } + Item { + Layout.fillWidth: true + } RippleButtonWithIcon { id: editorButton buttonRadius: Appearance.rounding.full @@ -534,7 +516,7 @@ ContentPage { Config.options.lock.centerClock = checked; } } - + ConfigSwitch { buttonIcon: "info" text: Translation.tr('Show "Locked" text') @@ -567,8 +549,6 @@ ContentPage { Config.options.lock.blur.extraZoom = value / 100; } } - - } } @@ -776,5 +756,4 @@ ContentPage { } } } - } From 56361dda8684a5492e81e11d0d27e3012b8ec8c0 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 21:45:10 +0300 Subject: [PATCH 047/125] using font in appearance --- .config/quickshell/ii/modules/background/CookieClock.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index cf31f21bf..011cf8882 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -348,7 +348,7 @@ Item { onPaint: { var ctx = getContext("2d"); ctx.clearRect(0,0,width,height); - ctx.font = "700 30px gabarito"; + ctx.font = "700 30px " + Appearance.font.family.title; var text = DateTime.date.substring(0,3) + " " + DateTime.date.substring(4,7); var radius = 78; From 7b13ddcbfc65eed25909ce2c934e875a4c4e5cf8 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:49:48 +0200 Subject: [PATCH 048/125] remove quote from cookie clock --- .../ii/modules/background/CookieClock.qml | 63 ------------------- 1 file changed, 63 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 011cf8882..1936cab45 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -14,8 +14,6 @@ Item { id: root readonly property string clockStyle: Config.options.background.clock.style - readonly property bool showQuote: Config.options.background.showQuote && Config.options.background.quote.length > 0 && !GlobalStates.screenLocked - property real implicitSize: 230 property real hourHandLength: 72 @@ -76,16 +74,6 @@ Item { color: root.colShadow transparentBorder: true } - DropShadow { - source: quoteBox - anchors.fill: source - horizontalOffset: 0 - verticalOffset: 2 - radius: 12 - samples: radius * 2 + 1 - color: root.colShadow - transparentBorder: true - } MaterialCookie { id: cookie @@ -568,55 +556,4 @@ Item { } } } - - - - // Quote - Rectangle{ - id: quoteBox - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: parent.bottom - anchors.topMargin: 24 - - implicitWidth: quoteText.width + quoteIcon.width + 16 // for spacing on both sides - implicitHeight: showQuote ? quoteText.height + 8 : 0 - radius: Appearance.rounding.small - color: Appearance.colors.colSecondaryContainer - - - Behavior on implicitHeight { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitWidth { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - - RowLayout{ - anchors.centerIn: parent - spacing: 4 - - MaterialSymbol{ - id: quoteIcon - visible: showQuote > 0 - iconSize: Appearance.font.pixelSize.huge - text: "comic_bubble" - } - StyledText{ - id: quoteText - visible : showQuote > 0 - Layout.fillWidth: true - horizontalAlignment: Text.AlignHCenter - text: Config.options.background.quote - font { - family: Appearance.font.family.main - pixelSize: Appearance.font.pixelSize.large - weight: Font.Normal - italic: true - } - } - } - } } From fda70b0aeffbd003635c872c26deba6a2fb329f2 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:02:01 +0200 Subject: [PATCH 049/125] add second precision option to settings, make cookie clock use DateTime.clock --- .../ii/modules/background/CookieClock.qml | 19 ++----------------- .../ii/modules/settings/GeneralConfig.qml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 1936cab45..53032b980 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -42,23 +42,8 @@ Item { property color colSeconds: Appearance.colors.colTertiary readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 - readonly property int clockMinute: parseInt(clockNumbers[1]) - - property int clockSecond: 0 - - // Loader to set root.clockSecond - Loader{ - active: Config.option.background.clock.cookie.secondDot - sourceComponent: Timer { - interval: 1000 - running: true;repeat: true - onTriggered: { - var now = new Date() - clockSecond = now.getSeconds() - } - } - } - + readonly property int clockMinute: DateTime.clock.minutes + readonly property int clockSecond: DateTime.clock.seconds implicitWidth: implicitSize diff --git a/.config/quickshell/ii/modules/settings/GeneralConfig.qml b/.config/quickshell/ii/modules/settings/GeneralConfig.qml index fd5fc154d..2dcc39a2e 100644 --- a/.config/quickshell/ii/modules/settings/GeneralConfig.qml +++ b/.config/quickshell/ii/modules/settings/GeneralConfig.qml @@ -210,6 +210,18 @@ ContentPage { icon: "nest_clock_farsight_analog" title: Translation.tr("Time") + ConfigSwitch { + buttonIcon: "pace" + text: Translation.tr("Second precision") + checked: Config.options.time.secondPrecision + onCheckedChanged: { + Config.options.time.secondPrecision = checked; + } + StyledToolTip { + text: Translation.tr("Enable if you want clocks to show seconds accurately") + } + } + ContentSubsection { title: Translation.tr("Format") tooltip: "" From 06840c6c848dd6cefc7f621106621f36a040c4a7 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:13:26 +0200 Subject: [PATCH 050/125] settings: fix weird hidden text of clock indicator --- .../ii/modules/settings/InterfaceConfig.qml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index cda8e0919..f61802688 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -246,13 +246,6 @@ ContentPage { } } - StyledText { - visible: Config.options.background.clock.style === "cookie" - Layout.leftMargin: 10 - color: Appearance.colors.colSubtext - font.pixelSize: Appearance.font.pixelSize.smallie - } - ConfigSpinBox { visible: Config.options.background.clock.style === "cookie" icon: "support" @@ -275,7 +268,7 @@ ContentPage { Config.options.background.clock.cookie.constantlyRotate = checked; } StyledToolTip { - text: "Makes the clock always rotate. This is extremely expensive (expect 50% usage on Intel UHD Graphics) and thus impractical." + text: "Makes the clock always rotate. This is extremely expensive\n(expect 50% usage on Intel UHD Graphics) and thus impractical." } } @@ -299,7 +292,7 @@ ContentPage { } ConfigSwitch { - visible: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" + enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" buttonIcon: "farsight_digital" text: Translation.tr("Clock indicator") checked: Config.options.background.clock.cookie.timeIndicators From d2ff23813d95e22d3c17fbc776106641094bd40b Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 22:15:36 +0300 Subject: [PATCH 051/125] fix constantlyRotate breaking side ring count --- .config/quickshell/ii/modules/common/widgets/MaterialCookie.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index c59e53613..7f30e2aac 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -52,7 +52,7 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var wave = constantlyRotate ? Math.sin(angle * root.sides + Math.PI/2 - root.shapeRotation) * root.amplitude : Math.sin(angle * root.shapeRotation + Math.PI/2) * root.amplitude + var wave = constantlyRotate ? Math.sin(angle * root.sides + Math.PI/2 - root.shapeRotation) * root.amplitude : Math.sin(angle * root.sides + Math.PI/2) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy points.push(Qt.point(x, y)) From fc5a5d7f63a5d2e9a5600cc365ad78fecd46627d Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:32:06 +0200 Subject: [PATCH 052/125] fix not being able to use dial dots with date --- .config/quickshell/ii/modules/settings/InterfaceConfig.qml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index f61802688..8d220d8ec 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -214,12 +214,7 @@ ContentPage { ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.dateStyle onSelected: newValue => { - if (newValue !== "bubble" && Config.options.background.clock.cookie.dialNumberStyle === "none") { - Config.options.background.clock.cookie.dateStyle = newValue; - } - if (newValue === "bubble" || newValue === "none") { - Config.options.background.clock.cookie.dateStyle = newValue; - } + Config.options.background.clock.cookie.dateStyle = newValue; } options: [ { From 7dda10629a4fba2a066c1fad1b1ad714d6fdee43 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:38:03 +0200 Subject: [PATCH 053/125] background clock: refractor hour hand and minute hand to new file --- .../ii/modules/background/Background.qml | 2 + .../{ => cookieClock}/CookieClock.qml | 64 ++++--------------- .../background/cookieClock/HourHand.qml | 48 ++++++++++++++ .../background/cookieClock/MinuteHand.qml | 51 +++++++++++++++ 4 files changed, 114 insertions(+), 51 deletions(-) rename .config/quickshell/ii/modules/background/{ => cookieClock}/CookieClock.qml (87%) create mode 100644 .config/quickshell/ii/modules/background/cookieClock/HourHand.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index d322120ba..47962f514 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -14,6 +14,8 @@ import Quickshell.Io import Quickshell.Wayland import Quickshell.Hyprland +import "./cookieClock" + Variants { id: root readonly property bool fixedClockPosition: Config.options.background.clock.fixedPosition diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml similarity index 87% rename from .config/quickshell/ii/modules/background/CookieClock.qml rename to .config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 53032b980..1a6c70dea 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -35,17 +35,17 @@ Item { property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer property color colOnBackground: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.5) - property color colMinuteHand: Appearance.colors.colPrimary - property color colHourHand: Appearance.colors.colSecondaryActive + property color colMinuteHand: Appearance.colors.colSecondary + property color colHourHand: Appearance.colors.colPrimary property color colOnHourHand: Appearance.colors.colOnPrimary property color colTimeIndicators: Appearance.colors.colSecondaryContainerHover property color colSeconds: Appearance.colors.colTertiary + readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 readonly property int clockMinute: DateTime.clock.minutes readonly property int clockSecond: DateTime.clock.seconds - implicitWidth: implicitSize implicitHeight: implicitSize @@ -169,59 +169,21 @@ Item { } // Hour hand - Item { - opacity: Config.options.background.clock.cookie.hourHandStyle === "hide" ? 0.0 : 1.0 + HourHand { anchors.fill: parent - z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 - rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - opacity: Config.options.background.clock.cookie.hourHandStyle !== "hide" ? 1.0 : 0 - anchors.verticalCenter: parent.verticalCenter - x: Config.options.background.clock.cookie.hourHandStyle === "classic" ? (parent.width / 2 - minuteHandWidth / 2) - 15 : parent.width / 2 - minuteHandWidth / 2 - width: hourHandLength - height: Config.options.background.clock.cookie.hourHandStyle === "classic" ? 8 : hourHandWidth - radius: Config.options.background.clock.cookie.hourHandStyle === "classic" ? 2 : hourHandWidth / 2 - color : Config.options.background.clock.cookie.hourHandStyle === "stroke" ? "transparent" : root.colHourHand - border.color: root.colHourHand - border.width: 4 - Behavior on opacity { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on x{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } + handWidth: root.hourHandWidth + clockHour: root.clockHour + clockMinute: root.clockMinute + style: Config.options.background.clock.cookie.hourHandStyle + color: root.colHourHand } // Minute hand - Item { - opacity: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? 0.0 : 1.0 + MinuteHand { anchors.fill: parent - z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3 - rotation: -90 + (360 / 60) * root.clockMinute - Behavior on rotation{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on opacity { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Rectangle { - anchors.verticalCenter: parent.verticalCenter - x: Config.options.background.clock.cookie.minuteHandStyle === "classic" ? (parent.width / 2 - minuteHandWidth / 2) - 15 : parent.width / 2 - minuteHandWidth / 2 - width: minuteHandLength - height: minuteHandWidth - radius: Config.options.background.clock.cookie.minuteHandStyle === "classic" ? 2 : minuteHandWidth / 2 - color: root.colMinuteHand - Behavior on height { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on x{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } + clockMinute: root.clockMinute + style: Config.options.background.clock.cookie.minuteHandStyle + color: root.colMinuteHand } // Center dot diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml new file mode 100644 index 000000000..17e88a500 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -0,0 +1,48 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.common.functions +import QtQuick + +Item { + id: root + anchors.fill: parent + + required property int clockHour + required property int clockMinute + property real handWidth: 16 + property string style: "fill" + property color color: Appearance.colors.colPrimary + + rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) + z: root.style === "fill" ? 3 : 1 + + opacity: root.style === "hide" ? 0.0 : 1.0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + + Rectangle { + anchors.verticalCenter: parent.verticalCenter + x: { + let position = parent.width / 2 - handWidth / 2; + if (root.style === "classic") position -= 15; + return position; + } + width: hourHandLength + height: root.style === "classic" ? 8 : handWidth + + radius: root.style === "classic" ? 2 : handWidth / 2 + color : root.style === "stroke" ? "transparent" : root.color + + border.color: root.color + border.width: 4 + + Behavior on x { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + } +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml new file mode 100644 index 000000000..17d7b7c65 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml @@ -0,0 +1,51 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.common.functions +import QtQuick + +Item { + id: root + anchors.fill: parent + + required property int clockMinute + property real handWidth: 16 + property string style: "medium" + property color color: Appearance.colors.colSecondary + + z: root.style === "thin" ? 1 : 3 + rotation: -90 + (360 / 60) * root.clockMinute + opacity: root.style === "hide" ? 0.0 : 1.0 + + Behavior on rotation{ + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on opacity { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + + Rectangle { + anchors.verticalCenter: parent.verticalCenter + x: { + let position = parent.width / 2 - root.handWidth / 2; + if (root.style === "classic") position -= 15; + return position; + } + width: minuteHandLength + height: root.handWidth + + radius: root.style === "classic" ? 2 : root.handWidth / 2 + color: root.color + + Behavior on height { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + + Behavior on x { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + } +} From 915877eba67179c56545d265374e4e5f888a0ee8 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 22:50:55 +0300 Subject: [PATCH 054/125] fix readability (i hope) --- .../ii/modules/background/cookieClock/CookieClock.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 1a6c70dea..d73a64cf1 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -345,7 +345,7 @@ Item { z: 5 implicitWidth: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 implicitHeight: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 - color: Appearance.colors.colPrimaryContainerHover + color: Appearance.colors.colPrimaryContainer radius: Appearance.rounding.large anchors{ left: cookie.left @@ -361,7 +361,7 @@ Item { StyledText{ anchors.centerIn: parent text: DateTime.date.substring(5,7) - color: Appearance.colors.colPrimary + color: Appearance.colors.colOnPrimaryContainer opacity: Config.options.background.clock.cookie.dateStyle === "bubble" ? 1.0 : 0 font { family: Appearance.font.family.reading @@ -395,7 +395,7 @@ Item { StyledText{ anchors.centerIn: parent text: DateTime.date.substring(8,10) - color: Appearance.colors.colTertiary + color: Appearance.colors.colOnPrimaryContainer opacity: Config.options.background.clock.cookie.dateStyle === "bubble" ? 1.0 : 0 font { family: Appearance.font.family.reading From b8b3b7993b9a57e95263a9ade0cfe3037ce4e027 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:59:16 +0200 Subject: [PATCH 055/125] refractor second hand to new file --- .../background/cookieClock/CookieClock.qml | 74 +++++-------------- .../background/cookieClock/SecondHand.qml | 66 +++++++++++++++++ .../quickshell/ii/modules/common/Config.qml | 2 +- .../ii/modules/settings/InterfaceConfig.qml | 4 +- 4 files changed, 88 insertions(+), 58 deletions(-) create mode 100644 .config/quickshell/ii/modules/background/cookieClock/SecondHand.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 1a6c70dea..0cda46fec 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -25,8 +25,8 @@ Item { property real hourDotSize: 12 property real centerGlowSize: 135 property real secondDotSize: 20 - property real secondsHandWidth: 2 - property real secondsHandLength: 100 + property real secondHandWidth: 2 + property real secondHandLength: 100 property real hourLineSize: 5 property real minuteLineSize: 2 property real hourNumberSize: 36 @@ -35,11 +35,11 @@ Item { property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer property color colOnBackground: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.5) - property color colMinuteHand: Appearance.colors.colSecondary property color colHourHand: Appearance.colors.colPrimary + property color colMinuteHand: Appearance.colors.colSecondary + property color colSecondHand: Appearance.colors.colTertiary property color colOnHourHand: Appearance.colors.colOnPrimary property color colTimeIndicators: Appearance.colors.colSecondaryContainerHover - property color colSeconds: Appearance.colors.colTertiary readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 @@ -181,11 +181,24 @@ Item { // Minute hand MinuteHand { anchors.fill: parent + handWidth: root.minuteHandWidth clockMinute: root.clockMinute style: Config.options.background.clock.cookie.minuteHandStyle color: root.colMinuteHand } + // Second hand + SecondHand { + id: secondHand + anchors.fill: parent + handWidth: root.secondHandWidth + handLength: root.secondHandLength + dotSize: root.secondDotSize + clockSecond: root.clockSecond + style: Config.options.background.clock.cookie.secondHandStyle + color: root.colSecondHand + } + // Center dot Rectangle { visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" && Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true @@ -221,55 +234,6 @@ Item { } } - - // Second hand/dot - Item { - id: secondHand - z: Config.options.background.clock.cookie.secondHandStyle === "line" ? 2 : 3 - opacity: Config.options.background.clock.cookie.secondHandStyle !== "hide" ? 1.0 : 0 - rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand - anchors.fill: parent - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Behavior on rotation{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - implicitWidth: Config.options.background.clock.cookie.secondHandStyle === "dot" ? root.secondDotSize : root.secondsHandLength - implicitHeight: Config.options.background.clock.cookie.secondHandStyle === "dot" ? root.secondDotSize : root.secondsHandWidth - radius: Config.options.background.clock.cookie.secondHandStyle === "dot" ? implicitWidth / 2 : root.secondsHandWidth / 2 - color: colSeconds - Behavior on implicitHeight { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitWidth { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: 10 - } - } - Rectangle{ - // Dot on the classic style - opacity: Config.options.background.clock.cookie.secondHandStyle === "classic" ? 1.0 : 0.0 - implicitHeight: 14 - implicitWidth: 14 - color: root.colSeconds - radius: Appearance.rounding.small - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: 40 - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - // Date (the rotating one with the second hand) Canvas { z: 0 @@ -313,7 +277,7 @@ Item { Rectangle{ z: 1 implicitWidth: 45 - implicitHeight: Config.options.background.clock.cookie.dateStyle === "square" ? 30 : 0 + implicitHeight: Config.options.background.clock.cookie.dateStyle === "rect" ? 30 : 0 color: root.colOnBackground radius: Appearance.rounding.small anchors{ @@ -325,7 +289,7 @@ Item { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } StyledText{ - opacity: Config.options.background.clock.cookie.dateStyle === "square" ? 1.0 : 0 + opacity: Config.options.background.clock.cookie.dateStyle === "rect" ? 1.0 : 0 Behavior on opacity{ animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } diff --git a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml new file mode 100644 index 000000000..38f574129 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml @@ -0,0 +1,66 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.common.functions +import QtQuick + +Item { + id: root + anchors.fill: parent + + required property int clockSecond + property real handWidth: 2 + property real handLength: 100 + property real dotSize: 20 + property string style: "hide" + property color color: Appearance.colors.colSecondary + + z: root.style === "line" ? 2 : 3 + rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand + opacity: root.style !== "hide" ? 1.0 : 0 + + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on rotation { + enabled: Config.options.background.clock.cookie.constantlyRotate // Animating every second is expensive... + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + + Rectangle { + implicitWidth: root.style === "dot" ? root.dotSize : root.handLength + implicitHeight: root.style === "dot" ? root.dotSize : root.handWidth + radius: root.style === "dot" ? implicitWidth / 2 : root.handWidth / 2 + color: root.color + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: 10 + } + } + Rectangle{ + // Dot on the classic style + opacity: root.style === "classic" ? 1.0 : 0.0 + implicitHeight: 14 + implicitWidth: 14 + color: root.color + radius: Appearance.rounding.small + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: 40 + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } +} \ No newline at end of file diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 484f86643..82d080aca 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -135,7 +135,7 @@ Singleton { property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" property string minuteHandStyle: "medium" // Options: "classic", "thin", "medium", "bold", "hide" property string secondHandStyle: "dot" // Options: "dot", "line" , "none" - property string dateStyle: "rotating" // Options: "rotating", "square", "bubble" , "none" + property string dateStyle: "rotating" // Options: "rotating", "rect", "bubble" , "none" property bool timeIndicators: true property bool centerGlow: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 8d220d8ec..168387c94 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -233,9 +233,9 @@ ContentPage { value: "rotating" }, { - displayName: Translation.tr("Square"), + displayName: Translation.tr("Rect"), icon: "square", - value: "square" + value: "rect" } ] } From 394d992b195ef24346cc0321106616c0368213d7 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:59:54 +0200 Subject: [PATCH 056/125] bg clock: make number column not look goofy --- .../ii/modules/background/cookieClock/CookieClock.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 0cda46fec..8ce82ac93 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -158,7 +158,7 @@ Item { Behavior on pixelSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - family: Appearance.font.family.main + family: Appearance.font.family.expressive weight: Font.Bold } Behavior on opacity { From 9b547d6ece904e4dc73d1f186f0ad56176f10375 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:20:44 +0200 Subject: [PATCH 057/125] bg clock: move date indicator to new file --- .../background/cookieClock/CookieClock.qml | 159 ++---------------- .../background/cookieClock/DateIndicator.qml | 154 +++++++++++++++++ 2 files changed, 169 insertions(+), 144 deletions(-) create mode 100644 .config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 6c145fa81..bb21d3f59 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -188,15 +188,18 @@ Item { } // Second hand - SecondHand { - id: secondHand + Loader { + active: Config.options.time.secondPrecision && Config.options.background.clock.cookie.secondHandStyle !== "none" anchors.fill: parent - handWidth: root.secondHandWidth - handLength: root.secondHandLength - dotSize: root.secondDotSize - clockSecond: root.clockSecond - style: Config.options.background.clock.cookie.secondHandStyle - color: root.colSecondHand + sourceComponent: SecondHand { + id: secondHand + handWidth: root.secondHandWidth + handLength: root.secondHandLength + dotSize: root.secondDotSize + clockSecond: root.clockSecond + style: Config.options.background.clock.cookie.secondHandStyle + color: root.colSecondHand + } } // Center dot @@ -234,142 +237,10 @@ Item { } } - // Date (the rotating one with the second hand) - Canvas { - z: 0 - width: cookie.width - height: cookie.height - rotation: secondHand.rotation + 45 // +45 degrees to align with minute hand - opacity: Config.options.background.clock.cookie.dateStyle === "rotating" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - onPaint: { - var ctx = getContext("2d"); - ctx.clearRect(0,0,width,height); - ctx.font = "700 30px " + Appearance.font.family.title; - - var text = DateTime.date.substring(0,3) + " " + DateTime.date.substring(4,7); - var radius = 78; - var angleStep = Math.PI / 2.35 / text.length; - - for (var i=0; i= 3) - ctx.fillStyle = root.colOnBackground; - else - ctx.fillStyle = Appearance.colors.colSecondaryHover; - - ctx.fillText(text[i], 0, 0); - ctx.restore(); - } - } - } - - // Date(only today's number) in right side of the clock - Rectangle{ - z: 1 - implicitWidth: 45 - implicitHeight: Config.options.background.clock.cookie.dateStyle === "rect" ? 30 : 0 - color: root.colOnBackground - radius: Appearance.rounding.small - anchors{ - verticalCenter: cookie.verticalCenter - right: cookie.right - rightMargin: 10 - } - Behavior on implicitHeight{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - StyledText{ - opacity: Config.options.background.clock.cookie.dateStyle === "rect" ? 1.0 : 0 - Behavior on opacity{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - anchors.centerIn: parent - color: Appearance.colors.colSecondaryHover - text: DateTime.date.substring(5,7) - font { - family: Appearance.font.family.expressive - pixelSize: 20 - weight: 1000 - } - } - } - - // Date bubble style left side - Rectangle{ - z: 5 - implicitWidth: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 - implicitHeight: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 - color: Appearance.colors.colPrimaryContainer - radius: Appearance.rounding.large - anchors{ - left: cookie.left - bottom: cookie.bottom - bottomMargin: 5 - } - Behavior on implicitWidth{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitHeight{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - StyledText{ - anchors.centerIn: parent - text: DateTime.date.substring(5,7) - color: Appearance.colors.colOnPrimaryContainer - opacity: Config.options.background.clock.cookie.dateStyle === "bubble" ? 1.0 : 0 - font { - family: Appearance.font.family.reading - pixelSize: 30 - weight: 1000 - } - Behavior on opacity{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - - // Date bubble style right side - Rectangle{ - z: 5 - implicitWidth: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 - implicitHeight: Config.options.background.clock.cookie.dateStyle === "bubble" ? dateSquareSize : 0 - color: Appearance.colors.colTertiaryContainer - radius: Appearance.rounding.verylarge - anchors{ - right: cookie.right - top: cookie.top - topMargin: 5 - } - Behavior on implicitWidth{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitHeight{ - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - StyledText{ - anchors.centerIn: parent - text: DateTime.date.substring(8,10) - color: Appearance.colors.colOnPrimaryContainer - opacity: Config.options.background.clock.cookie.dateStyle === "bubble" ? 1.0 : 0 - font { - family: Appearance.font.family.reading - pixelSize: 30 - weight: 1000 - } - Behavior on opacity{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } + DateIndicator { + anchors.fill: parent + colOnBackground: root.colOnBackground + style: Config.options.background.clock.cookie.dateStyle } // Hour Indicator numbers (3-6-9-12) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml new file mode 100644 index 000000000..aa36b3f8c --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -0,0 +1,154 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.common.functions +import QtQuick + +Item { + id: root + property string style: "rotating" + property color colOnBackground: Appearance.colors.colOnSecondaryContainer + + Canvas { + z: 0 + width: parent.width + height: parent.height + rotation: { + if (!Config.options.time.secondPrecision) return 0; + return secondHand.rotation + 45 // +45 degrees to align with minute hand + } + opacity: root.style === "rotating" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + onPaint: { + var ctx = getContext("2d"); + ctx.clearRect(0, 0, width, height); + ctx.font = "700 30px " + Appearance.font.family.title; + + var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); + var radius = 78; + var angleStep = Math.PI / 2.35 / text.length; + + for (var i = 0; i < text.length; i++) { + var angle = i * angleStep - Math.PI / 2; + var x = width / 2 + radius * Math.cos(angle); + var y = height / 2 + radius * Math.sin(angle); + + ctx.save(); + ctx.translate(x, y); + ctx.rotate(angle + Math.PI / 2); + + if (i >= 3) + ctx.fillStyle = root.colOnBackground; + else + ctx.fillStyle = Appearance.colors.colSecondaryHover; + + ctx.fillText(text[i], 0, 0); + ctx.restore(); + } + } + } + + // Date(only today's number) in right side of the clock + Rectangle { + z: 1 + implicitWidth: 45 + implicitHeight: root.style === "rect" ? 30 : 0 + color: root.colOnBackground + radius: Appearance.rounding.small + anchors { + verticalCenter: parent.verticalCenter + right: parent.right + rightMargin: 10 + } + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + StyledText { + opacity: root.style === "rect" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + anchors.centerIn: parent + color: Appearance.colors.colSecondaryHover + text: DateTime.date.substring(5, 7) + font { + family: Appearance.font.family.expressive + pixelSize: 20 + weight: 1000 + } + } + } + + // Date bubble style left side + Rectangle { + z: 5 + implicitWidth: root.style === "bubble" ? dateSquareSize : 0 + implicitHeight: root.style === "bubble" ? dateSquareSize : 0 + color: Appearance.colors.colPrimaryContainer + radius: Appearance.rounding.large + anchors { + left: parent.left + bottom: parent.bottom + bottomMargin: 5 + } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + StyledText { + anchors.centerIn: parent + text: DateTime.date.substring(5, 7) + color: Appearance.colors.colOnPrimaryContainer + opacity: root.style === "bubble" ? 1.0 : 0 + font { + family: Appearance.font.family.reading + pixelSize: 30 + weight: 1000 + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } + + // Date bubble style right side + Rectangle { + z: 5 + implicitWidth: root.style === "bubble" ? dateSquareSize : 0 + implicitHeight: root.style === "bubble" ? dateSquareSize : 0 + color: Appearance.colors.colTertiaryContainer + radius: Appearance.rounding.verylarge + anchors { + right: parent.right + top: parent.top + topMargin: 5 + } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + StyledText { + anchors.centerIn: parent + text: DateTime.date.substring(8, 10) + color: Appearance.colors.colOnPrimaryContainer + opacity: root.style === "bubble" ? 1.0 : 0 + font { + family: Appearance.font.family.reading + pixelSize: 30 + weight: 1000 + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } +} From 07a3edf02072c7238f6db4a598c5109a90d47c76 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 6 Oct 2025 09:31:39 +0200 Subject: [PATCH 058/125] move more stuff out of cookie clock file --- .../background/cookieClock/CookieClock.qml | 218 +----------------- .../background/cookieClock/HourMarks.qml | 66 ++++++ .../background/cookieClock/MinuteMarks.qml | 134 +++++++++++ .../background/cookieClock/TimeColumn.qml | 38 +++ .../ii/modules/settings/InterfaceConfig.qml | 24 +- 5 files changed, 259 insertions(+), 221 deletions(-) create mode 100644 .config/quickshell/ii/modules/background/cookieClock/HourMarks.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index bb21d3f59..c68360d43 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -70,102 +70,17 @@ Item { constantlyRotate: Config.options.background.clock.cookie.constantlyRotate } - // Hour dots dial style - Repeater { - model: 12 - Item { - required property int index - opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 - rotation: 360 / 12 * index - anchors.fill: parent - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - anchors{ - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 10 : 50 - } - Behavior on anchors.leftMargin{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - implicitWidth: root.hourDotSize - implicitHeight: implicitWidth - radius: implicitWidth / 2 - color: root.colOnBackground - opacity: 0.5 - } - } + // Hour/minutes numbers/dots/lines + MinuteMarks { + anchors.fill: parent + } + HourMarks { + anchors.fill: parent } - // Center glow lines - Rectangle { - id: glowLines - z: 1 - anchors.centerIn: cookie - Repeater { - model: 12 - Item { - required property int index - opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 - rotation: 360 / 12 * index - anchors.fill: parent - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.centerGlow ? 50 : 75 - } - implicitWidth: root.hourDotSize - implicitHeight: implicitWidth / 2 - radius: implicitWidth / 2 - color: root.colOnBackground - opacity: Config.options.background.clock.cookie.centerGlow ? 0.5 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Behavior on anchors.leftMargin{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } - } - - // Numbers column - Column { - id: timeIndicators - z: 1 - anchors.centerIn: cookie - spacing: -16 - Repeater { - model: root.clockNumbers - delegate: StyledText { - required property string modelData - opacity: Config.options.background.clock.cookie.timeIndicators ? 1.0 : 0 // Not using visible to allow smooth transition - anchors.horizontalCenter: parent?.horizontalCenter - color: root.colOnBackground - text: modelData.padStart(2, "0") - font { - property real numberSizeWithoutGlow: modelData.match(/am|pm/i) ? 26 : 68 - property real numberSizeWithGlow: modelData.match(/am|pm/i) ? 10 : 40 - pixelSize: !Config.options.background.clock.cookie.timeIndicators ? 100 : // open/close animation - Config.options.background.clock.cookie.centerGlow ? numberSizeWithGlow : numberSizeWithoutGlow // changing size according to center glow - Behavior on pixelSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - family: Appearance.font.family.expressive - weight: Font.Bold - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } + // Number column in the middle + TimeColumn { + anchors.centerIn: parent } // Hour hand @@ -217,125 +132,10 @@ Item { } } - // Center glow - Rectangle { - opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 - z: 0 - color: root.colTimeIndicators - anchors.centerIn: parent - implicitWidth: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 - implicitHeight: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 // Not using implicitHeight to allow smooth transition - radius: implicitWidth / 2 - Behavior on opacity { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitWidth { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitHeight { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } - DateIndicator { anchors.fill: parent colOnBackground: root.colOnBackground style: Config.options.background.clock.cookie.dateStyle } - - // Hour Indicator numbers (3-6-9-12) - Repeater { - model: 4 - Item { - required property int index - opacity: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 1.0 : 0 - rotation: 360 / 4 * index - anchors.fill: parent - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - color: "transparent" - implicitWidth: root.hourNumberSize - implicitHeight: implicitWidth - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 32 : 96 - } - Behavior on anchors.leftMargin{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - StyledText{ - color: root.colOnBackground - anchors.centerIn: parent - text: index === 0 ? "9" : - index === 1 ? "12" : - index === 2 ? "3" : "6" - rotation: index % 2 === 0 ? index * 90 : -index * 90 //A better way can be found to show texts on right angle - font { - family: Appearance.font.family.reading - pixelSize: 80 - weight: 1000 - } - } - } - } - } - // Full dial style hour lines - Repeater { - model: 12 - Item { - required property int index - rotation: 360 / 12 * index - anchors.fill: parent - opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - implicitWidth: root.hourLineSize * 3.5 - implicitHeight: root.hourLineSize - radius: implicitWidth / 2 - color: root.colOnBackground - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 - } - Behavior on anchors.leftMargin{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } - // Full dial style minute lines - Repeater { - model: 60 - Item { - required property int index - rotation: 360 / 60 * index - anchors.fill: parent - opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - implicitWidth: root.minuteLineSize * 3.5 - implicitHeight: root.minuteLineSize - radius: implicitWidth / 2 - color: root.colOnBackground - opacity: 0.5 - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 - } - Behavior on anchors.leftMargin{ - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml new file mode 100644 index 000000000..1c497ab24 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml @@ -0,0 +1,66 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.common.functions +import QtQuick + +Item { + Rectangle { + opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 + z: 0 + color: root.colTimeIndicators + anchors.centerIn: parent + implicitWidth: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 + implicitHeight: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 // Not using implicitHeight to allow smooth transition + radius: implicitWidth / 2 + Behavior on opacity { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + } + + // Center glow lines + Rectangle { + id: glowLines + z: 1 + anchors.centerIn: parent + Repeater { + model: 12 + Item { + required property int index + opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 + rotation: 360 / 12 * index + anchors.fill: parent + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: Config.options.background.clock.cookie.centerGlow ? 50 : 75 + } + implicitWidth: root.hourDotSize + implicitHeight: implicitWidth / 2 + radius: implicitWidth / 2 + color: root.colOnBackground + opacity: Config.options.background.clock.cookie.centerGlow ? 0.5 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } + } + } +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml new file mode 100644 index 000000000..a9856e15d --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml @@ -0,0 +1,134 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.common.functions +import QtQuick + +Item { + Repeater { + model: 12 + Item { + required property int index + opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 + rotation: 360 / 12 * index + anchors.fill: parent + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Rectangle { + anchors{ + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 10 : 50 + } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + implicitWidth: root.hourDotSize + implicitHeight: implicitWidth + radius: implicitWidth / 2 + color: root.colOnBackground + opacity: 0.5 + } + } + } + + // Hour Indicator numbers (3-6-9-12) + Repeater { + model: 4 + Item { + required property int index + opacity: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 1.0 : 0 + rotation: 360 / 4 * index + anchors.fill: parent + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Rectangle { + color: "transparent" + implicitWidth: root.hourNumberSize + implicitHeight: implicitWidth + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 32 : 96 + } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + StyledText{ + color: root.colOnBackground + anchors.centerIn: parent + text: index === 0 ? "9" : + index === 1 ? "12" : + index === 2 ? "3" : "6" + rotation: index % 2 === 0 ? index * 90 : -index * 90 //A better way can be found to show texts on right angle + font { + family: Appearance.font.family.reading + pixelSize: 80 + weight: 1000 + } + } + } + } + } + + // Full dial style hour lines + Repeater { + model: 12 + Item { + required property int index + rotation: 360 / 12 * index + anchors.fill: parent + opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Rectangle { + implicitWidth: root.hourLineSize * 3.5 + implicitHeight: root.hourLineSize + radius: implicitWidth / 2 + color: root.colOnBackground + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 + } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } + } + // Full dial style minute lines + Repeater { + model: 60 + Item { + required property int index + rotation: 360 / 60 * index + anchors.fill: parent + opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Rectangle { + implicitWidth: root.minuteLineSize * 3.5 + implicitHeight: root.minuteLineSize + radius: implicitWidth / 2 + color: root.colOnBackground + opacity: 0.5 + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 + } + Behavior on anchors.leftMargin{ + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } + } +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml new file mode 100644 index 000000000..89902a23b --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml @@ -0,0 +1,38 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.common.functions +import QtQuick + +Column { + id: timeIndicators + z: 1 + spacing: -16 + Repeater { + model: root.clockNumbers + delegate: StyledText { + required property string modelData + opacity: Config.options.background.clock.cookie.timeIndicators ? 1.0 : 0 // Not using visible to allow smooth transition + anchors.horizontalCenter: parent?.horizontalCenter + color: root.colOnBackground + text: modelData.padStart(2, "0") + font { + property real numberSizeWithoutGlow: modelData.match(/am|pm/i) ? 26 : 68 + property real numberSizeWithGlow: modelData.match(/am|pm/i) ? 10 : 40 + pixelSize: !Config.options.background.clock.cookie.timeIndicators ? 100 : // open/close animation + Config.options.background.clock.cookie.centerGlow ? numberSizeWithGlow : numberSizeWithoutGlow // changing size according to center glow + Behavior on pixelSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + family: Appearance.font.family.expressive + weight: Font.Bold + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } +} diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 168387c94..c82716c01 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -78,8 +78,8 @@ ContentPage { } options: [ { - displayName: Translation.tr("None"), - icon: "deselect", + displayName: "", + icon: "block", value: "none" }, { @@ -110,6 +110,11 @@ ContentPage { Config.options.background.clock.cookie.hourHandStyle = newValue; } options: [ + { + displayName: "", + icon: "block", + value: "hide" + }, { displayName: Translation.tr("Classic"), icon: "radio", @@ -125,11 +130,6 @@ ContentPage { icon: "stroke_full", value: "fill" }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } ] } } @@ -144,6 +144,11 @@ ContentPage { Config.options.background.clock.cookie.minuteHandStyle = newValue; } options: [ + { + displayName: "", + icon: "block", + value: "hide" + }, { displayName: Translation.tr("Classic"), icon: "radio", @@ -164,11 +169,6 @@ ContentPage { icon: "pen_size_5", value: "bold" }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } ] } } From 122c1f8e3741a87ba829bbc9258d0cad9394be50 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:09:06 +0200 Subject: [PATCH 059/125] make TimeColumn not rely on autocascade, rename centerGlow -> hourMarks --- .../background/cookieClock/CookieClock.qml | 12 ++++-- .../background/cookieClock/HourMarks.qml | 33 +++++++++++----- .../background/cookieClock/TimeColumn.qml | 39 ++++++++++++------- .../quickshell/ii/modules/common/Config.qml | 2 +- .../modules/common/widgets/MaterialCookie.qml | 6 +-- .../ii/modules/settings/InterfaceConfig.qml | 24 ++++++------ 6 files changed, 74 insertions(+), 42 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index c68360d43..1bad2824b 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -7,7 +7,6 @@ import qs.modules.common.widgets import qs.modules.common.functions import QtQuick import QtQuick.Layouts -import Quickshell import Qt5Compat.GraphicalEffects Item { @@ -23,7 +22,7 @@ Item { Config.options.background.clock.cookie.minuteHandStyle === "medium" ? 12 : 5 property real centerDotSize: 10 property real hourDotSize: 12 - property real centerGlowSize: 135 + property real hourMarkSize: 135 property real secondDotSize: 20 property real secondHandWidth: 2 property real secondHandLength: 100 @@ -75,12 +74,18 @@ Item { anchors.fill: parent } HourMarks { - anchors.fill: parent + anchors.centerIn: parent + implicitSize: root.hourMarkSize + markLength: root.hourDotSize + color: root.colTimeIndicators + colOnBackground: root.colOnBackground } // Number column in the middle TimeColumn { anchors.centerIn: parent + color: root.colOnBackground + clockNumbers: root.clockNumbers } // Hour hand @@ -132,6 +137,7 @@ Item { } } + // Date DateIndicator { anchors.fill: parent colOnBackground: root.colOnBackground diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml index 1c497ab24..b714024b0 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml @@ -8,13 +8,21 @@ import qs.modules.common.functions import QtQuick Item { + id: root + property real implicitSize: 135 + property real markLength: 10 + property color color: Appearance.colors.colOnSecondaryContainer + property color colOnBackground: Appearance.colors.colSecondaryContainer + + property bool isEnabled: Config.options.background.clock.cookie.hourMarks + Rectangle { - opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 + opacity: root.isEnabled ? 1.0 : 0 z: 0 - color: root.colTimeIndicators + color: root.color anchors.centerIn: parent - implicitWidth: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 - implicitHeight: Config.options.background.clock.cookie.centerGlow ? centerGlowSize : centerGlowSize * 1.75 // Not using implicitHeight to allow smooth transition + implicitWidth: root.isEnabled ? root.implicitSize : root.implicitSize * 1.75 + implicitHeight: root.isEnabled ? root.implicitSize : root.implicitSize * 1.75 // Not using implicitHeight to allow smooth transition radius: implicitWidth / 2 Behavior on opacity { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) @@ -27,7 +35,7 @@ Item { } } - // Center glow lines + // Hour mark lines Rectangle { id: glowLines z: 1 @@ -36,23 +44,28 @@ Item { model: 12 Item { required property int index - opacity: Config.options.background.clock.cookie.centerGlow ? 1.0 : 0 - rotation: 360 / 12 * index anchors.fill: parent + + rotation: 360 / 12 * index + opacity: root.isEnabled ? 1.0 : 0 + Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } + Rectangle { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.centerGlow ? 50 : 75 + leftMargin: root.isEnabled ? 50 : 75 } - implicitWidth: root.hourDotSize + implicitWidth: root.markLength implicitHeight: implicitWidth / 2 + radius: implicitWidth / 2 color: root.colOnBackground - opacity: Config.options.background.clock.cookie.centerGlow ? 0.5 : 0 + opacity: root.isEnabled ? 0.5 : 0 + Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } diff --git a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml index 89902a23b..335fbaba0 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml @@ -8,30 +8,43 @@ import qs.modules.common.functions import QtQuick Column { - id: timeIndicators + id: root + required property list clockNumbers + property bool isEnabled: Config.options.background.clock.cookie.timeIndicators + property color color: Appearance.colors.colOnSecondaryContainer + z: 1 spacing: -16 + Repeater { model: root.clockNumbers + delegate: StyledText { required property string modelData - opacity: Config.options.background.clock.cookie.timeIndicators ? 1.0 : 0 // Not using visible to allow smooth transition - anchors.horizontalCenter: parent?.horizontalCenter - color: root.colOnBackground + property bool hourMarksEnabled: Config.options.background.clock.cookie.hourMarks + property bool isAmPm: !!modelData.match(/am|pm/i) + property real numberSizeWithoutGlow: isAmPm ? 26 : 68 + property real numberSizeWithGlow: isAmPm ? 10 : 40 + property real numberSize: root.isEnabled ? (hourMarksEnabled ? numberSizeWithGlow : numberSizeWithoutGlow) : 100 // open/close animation + + anchors.horizontalCenter: root.horizontalCenter + visible: opacity > 0 + color: root.color + opacity: root.isEnabled ? 1.0 : 0 + + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + text: modelData.padStart(2, "0") + font { - property real numberSizeWithoutGlow: modelData.match(/am|pm/i) ? 26 : 68 - property real numberSizeWithGlow: modelData.match(/am|pm/i) ? 10 : 40 - pixelSize: !Config.options.background.clock.cookie.timeIndicators ? 100 : // open/close animation - Config.options.background.clock.cookie.centerGlow ? numberSizeWithGlow : numberSizeWithoutGlow // changing size according to center glow + family: Appearance.font.family.expressive + weight: Font.Bold + pixelSize: numberSize Behavior on pixelSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - family: Appearance.font.family.expressive - weight: Font.Bold - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } } } diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 82d080aca..5efc2a1ec 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -137,7 +137,7 @@ Singleton { property string secondHandStyle: "dot" // Options: "dot", "line" , "none" property string dateStyle: "rotating" // Options: "rotating", "rect", "bubble" , "none" property bool timeIndicators: true - property bool centerGlow: true + property bool hourMarks: true property bool dateInClock: true property bool constantlyRotate: false } diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 7f30e2aac..1d26a857c 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -20,8 +20,7 @@ Item { property real shapeRotation: 0 - - Loader{ + Loader { active: constantlyRotate sourceComponent: FrameAnimation{ running: true @@ -52,7 +51,8 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var wave = constantlyRotate ? Math.sin(angle * root.sides + Math.PI/2 - root.shapeRotation) * root.amplitude : Math.sin(angle * root.sides + Math.PI/2) * root.amplitude + var rotatedAngle = angle * root.sides + Math.PI/2 + (root.shapeRotation * root.constantlyRotate) + var wave = Math.sin(rotatedAngle) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy points.push(Qt.point(x, y)) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index c82716c01..f1c9e16fb 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -64,7 +64,7 @@ ContentPage { onSelected: newValue => { Config.options.background.clock.cookie.dialNumberStyle = newValue; if (newValue !== "dots" && newValue !== "full") { - Config.options.background.clock.cookie.centerGlow = false; + Config.options.background.clock.cookie.hourMarks = false; } if (newValue === "numbers") { Config.options.background.clock.cookie.timeIndicators = false; @@ -183,6 +183,11 @@ ContentPage { Config.options.background.clock.cookie.secondHandStyle = newValue; } options: [ + { + displayName: "", + icon: "block", + value: "hide" + }, { displayName: Translation.tr("Classic"), icon: "radio", @@ -198,11 +203,6 @@ ContentPage { icon: "adjust", value: "dot" }, - { - displayName: Translation.tr("Hide"), - icon: "deselect", - value: "hide" - } ] } } @@ -218,8 +218,8 @@ ContentPage { } options: [ { - displayName: Translation.tr("None"), - icon: "deselect", + displayName: "", + icon: "block", value: "none" }, { @@ -273,13 +273,13 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" buttonIcon: "brightness_7" - text: Translation.tr("Center glow") - checked: Config.options.background.clock.cookie.centerGlow + text: Translation.tr("Hour marks") + checked: Config.options.background.clock.cookie.hourMarks onEnabledChanged: { - checked = Config.options.background.clock.cookie.centerGlow; + checked = Config.options.background.clock.cookie.hourMarks; } onCheckedChanged: { - Config.options.background.clock.cookie.centerGlow = checked; + Config.options.background.clock.cookie.hourMarks = checked; } StyledToolTip { text: "Can only be turned on using the 'Dots' or 'Full' dial style for aesthetic reasons" From d6e9e9f2a5f070cfa7269b5c237ce61ba663c379 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:09:19 +0200 Subject: [PATCH 060/125] less weird no text selection buttons --- .../ii/modules/common/widgets/SelectionGroupButton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/common/widgets/SelectionGroupButton.qml b/.config/quickshell/ii/modules/common/widgets/SelectionGroupButton.qml index 178138953..ab7aa1e46 100644 --- a/.config/quickshell/ii/modules/common/widgets/SelectionGroupButton.qml +++ b/.config/quickshell/ii/modules/common/widgets/SelectionGroupButton.qml @@ -23,7 +23,7 @@ GroupButton { colBackgroundActive: Appearance.colors.colSecondaryContainerActive contentItem: RowLayout { - spacing: 4 + spacing: 4 * (root.buttonText?.length > 0) Loader { Layout.alignment: Qt.AlignVCenter @@ -42,7 +42,7 @@ GroupButton { } Item { - implicitWidth: textItem.implicitWidth + implicitWidth: root.buttonText?.length > 0 ? textItem.implicitWidth : 0 implicitHeight: textMetrics.height // Force height to that of regular text TextMetrics { From a5b80c1c731039383a6b3ef92c34bfd1cb769589 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:15:46 +0200 Subject: [PATCH 061/125] =?UTF-8?q?there=20must=20be=20a=20space=20before?= =?UTF-8?q?=20`{`=20=F0=9F=98=AD=F0=9F=92=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ii/modules/background/cookieClock/HourMarks.qml | 2 +- .../ii/modules/background/cookieClock/MinuteHand.qml | 2 +- .../modules/background/cookieClock/MinuteMarks.qml | 12 ++++++------ .../ii/modules/background/cookieClock/SecondHand.qml | 2 +- .../ii/modules/common/widgets/MaterialCookie.qml | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml index b714024b0..2f4304845 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml @@ -69,7 +69,7 @@ Item { Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - Behavior on anchors.leftMargin{ + Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml index 17d7b7c65..261932572 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml @@ -20,7 +20,7 @@ Item { rotation: -90 + (360 / 60) * root.clockMinute opacity: root.style === "hide" ? 0.0 : 1.0 - Behavior on rotation{ + Behavior on rotation { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } Behavior on opacity { diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml index a9856e15d..af29f426d 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml @@ -19,12 +19,12 @@ Item { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } Rectangle { - anchors{ + anchors { left: parent.left verticalCenter: parent.verticalCenter leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 10 : 50 } - Behavior on anchors.leftMargin{ + Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } implicitWidth: root.hourDotSize @@ -56,10 +56,10 @@ Item { verticalCenter: parent.verticalCenter leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 32 : 96 } - Behavior on anchors.leftMargin{ + Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - StyledText{ + StyledText { color: root.colOnBackground anchors.centerIn: parent text: index === 0 ? "9" : @@ -97,7 +97,7 @@ Item { verticalCenter: parent.verticalCenter leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 } - Behavior on anchors.leftMargin{ + Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } } @@ -125,7 +125,7 @@ Item { verticalCenter: parent.verticalCenter leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 } - Behavior on anchors.leftMargin{ + Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml index 38f574129..e7bdb0e84 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml @@ -47,7 +47,7 @@ Item { leftMargin: 10 } } - Rectangle{ + Rectangle { // Dot on the classic style opacity: root.style === "classic" ? 1.0 : 0.0 implicitHeight: 14 diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 1d26a857c..4acd0984c 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -22,7 +22,7 @@ Item { Loader { active: constantlyRotate - sourceComponent: FrameAnimation{ + sourceComponent: FrameAnimation { running: true onTriggered: { shapeRotation += 0.05 From 27c36530cb0dfa8ad5d2c0fc09146f40bdb2fb6c Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:26:07 +0200 Subject: [PATCH 062/125] date indicator: use expressive font for bubble date --- .../ii/modules/background/cookieClock/DateIndicator.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index aa36b3f8c..88e22ade0 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -20,10 +20,12 @@ Item { if (!Config.options.time.secondPrecision) return 0; return secondHand.rotation + 45 // +45 degrees to align with minute hand } + opacity: root.style === "rotating" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } + onPaint: { var ctx = getContext("2d"); ctx.clearRect(0, 0, width, height); @@ -53,7 +55,7 @@ Item { } } - // Date(only today's number) in right side of the clock + // Date (only today's number) in right side of the clock Rectangle { z: 1 implicitWidth: 45 @@ -108,7 +110,7 @@ Item { color: Appearance.colors.colOnPrimaryContainer opacity: root.style === "bubble" ? 1.0 : 0 font { - family: Appearance.font.family.reading + family: Appearance.font.family.expressive pixelSize: 30 weight: 1000 } @@ -142,7 +144,7 @@ Item { color: Appearance.colors.colOnPrimaryContainer opacity: root.style === "bubble" ? 1.0 : 0 font { - family: Appearance.font.family.reading + family: Appearance.font.family.expressive pixelSize: 30 weight: 1000 } From 70a5343d608f0534f927770cc1169be35b019545 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 17:04:58 +0300 Subject: [PATCH 063/125] revert back bubble colors --- .../ii/modules/background/cookieClock/DateIndicator.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 88e22ade0..74c802106 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -107,7 +107,7 @@ Item { StyledText { anchors.centerIn: parent text: DateTime.date.substring(5, 7) - color: Appearance.colors.colOnPrimaryContainer + color: Appearance.colors.colPrimary opacity: root.style === "bubble" ? 1.0 : 0 font { family: Appearance.font.family.expressive @@ -141,7 +141,7 @@ Item { StyledText { anchors.centerIn: parent text: DateTime.date.substring(8, 10) - color: Appearance.colors.colOnPrimaryContainer + color: Appearance.colors.colTertiary opacity: root.style === "bubble" ? 1.0 : 0 font { family: Appearance.font.family.expressive From 1ec94aa2a68dea2bb72e0dfd7f29a3cad03e0bc9 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 17:08:15 +0300 Subject: [PATCH 064/125] make constantlyRotate, rotate in clockwise --- .config/quickshell/ii/modules/common/widgets/MaterialCookie.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 4acd0984c..671f9b86f 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -51,7 +51,7 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var rotatedAngle = angle * root.sides + Math.PI/2 + (root.shapeRotation * root.constantlyRotate) + var rotatedAngle = angle * root.sides + Math.PI/2 + (root.shapeRotation * -root.constantlyRotate) var wave = Math.sin(rotatedAngle) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy From 594dc6482494adb91852d0bcbea317562259b340 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 18:32:02 +0300 Subject: [PATCH 065/125] change rect date animation and background color --- .../modules/background/cookieClock/DateIndicator.qml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 74c802106..671433a48 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -11,7 +11,8 @@ Item { id: root property string style: "rotating" property color colOnBackground: Appearance.colors.colOnSecondaryContainer - + property color colOnSecondary: Appearance.colors.colOnSecondaryContainer + Canvas { z: 0 width: parent.width @@ -55,12 +56,12 @@ Item { } } - // Date (only today's number) in right side of the clock + // Square date (only today's number) in right side of the clock Rectangle { z: 1 - implicitWidth: 45 + implicitWidth: root.style === "rect" ? 45 : 0 implicitHeight: root.style === "rect" ? 30 : 0 - color: root.colOnBackground + color: root.colOnSecondary radius: Appearance.rounding.small anchors { verticalCenter: parent.verticalCenter @@ -70,6 +71,9 @@ Item { Behavior on implicitHeight { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } StyledText { opacity: root.style === "rect" ? 1.0 : 0 Behavior on opacity { From 0e89e8dcc259ac3230d752118f22811c2ad1a1fe Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 18:41:45 +0300 Subject: [PATCH 066/125] make rotating date indicator rotate with secondHand --- .../ii/modules/background/cookieClock/CookieClock.qml | 1 + .../ii/modules/background/cookieClock/DateIndicator.qml | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 1bad2824b..a1a33c472 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -109,6 +109,7 @@ Item { // Second hand Loader { + id: secondHandLoader active: Config.options.time.secondPrecision && Config.options.background.clock.cookie.secondHandStyle !== "none" anchors.fill: parent sourceComponent: SecondHand { diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 671433a48..6efc6cb0e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -12,6 +12,7 @@ Item { property string style: "rotating" property color colOnBackground: Appearance.colors.colOnSecondaryContainer property color colOnSecondary: Appearance.colors.colOnSecondaryContainer + Canvas { z: 0 @@ -19,14 +20,14 @@ Item { height: parent.height rotation: { if (!Config.options.time.secondPrecision) return 0; - return secondHand.rotation + 45 // +45 degrees to align with minute hand + return secondHandLoader.item.rotation + 45 // +45 degrees to align with minute hand } opacity: root.style === "rotating" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - + onPaint: { var ctx = getContext("2d"); ctx.clearRect(0, 0, width, height); From fac79c8a7dcd37eb781815fbdbb8d501ce9d7e8b Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 18:48:40 +0300 Subject: [PATCH 067/125] Dont deselect certain date indicators when selecting specific date styles --- .../ii/modules/background/cookieClock/DateIndicator.qml | 2 +- .config/quickshell/ii/modules/settings/InterfaceConfig.qml | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 6efc6cb0e..121196ea2 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -22,7 +22,7 @@ Item { if (!Config.options.time.secondPrecision) return 0; return secondHandLoader.item.rotation + 45 // +45 degrees to align with minute hand } - + opacity: root.style === "rotating" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index f1c9e16fb..430ec6c40 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -69,12 +69,6 @@ ContentPage { if (newValue === "numbers") { Config.options.background.clock.cookie.timeIndicators = false; } - if (newValue != "none") { - Config.options.background.clock.cookie.dateInClock = false; - if (Config.options.background.clock.cookie.dateStyle !== "bubble") { - Config.options.background.clock.cookie.dateStyle = "none"; - } - } } options: [ { From 924a01bca67c3e9c85dd1d05602f31e81aa42cf9 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 19:01:53 +0300 Subject: [PATCH 068/125] fix the animation when changing clock's side count --- .../quickshell/ii/modules/common/widgets/MaterialCookie.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 671f9b86f..16e09057d 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -7,7 +7,7 @@ import qs.modules.common Item { id: root - property int sides: 12 + property real sides: 12 property int implicitSize: 100 property real amplitude: implicitSize / 50 property int renderPoints: 360 @@ -30,6 +30,9 @@ Item { } } + Behavior on sides { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } Shape { id: shape From fc8985b2428090896c32c111ba372dd3b33a9c25 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 19:25:46 +0300 Subject: [PATCH 069/125] animate date bubbles with MaterialCookie on constantlyRotate --- .../background/cookieClock/DateIndicator.qml | 56 ++++++++++++------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 121196ea2..2b95345a3 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -92,24 +92,33 @@ Item { } // Date bubble style left side - Rectangle { - z: 5 - implicitWidth: root.style === "bubble" ? dateSquareSize : 0 - implicitHeight: root.style === "bubble" ? dateSquareSize : 0 - color: Appearance.colors.colPrimaryContainer - radius: Appearance.rounding.large + Item { + width: root.style === "bubble" ? dateSquareSize : 0 + height: root.style === "bubble" ? dateSquareSize : 0 anchors { left: parent.left bottom: parent.bottom - bottomMargin: 5 + topMargin: 50 } - Behavior on implicitWidth { + Behavior on width { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - Behavior on implicitHeight { + Behavior on height { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } + MaterialCookie { + z: 5 + sides: 4 + anchors.centerIn: parent + color: Appearance.colors.colPrimaryContainer + implicitSize: root.style === "bubble" ? dateSquareSize : 0 + constantlyRotate: Config.options.background.clock.cookie.constantlyRotate + Behavior on implicitSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + } StyledText { + z: 6 anchors.centerIn: parent text: DateTime.date.substring(5, 7) color: Appearance.colors.colPrimary @@ -126,26 +135,35 @@ Item { } // Date bubble style right side - Rectangle { - z: 5 - implicitWidth: root.style === "bubble" ? dateSquareSize : 0 - implicitHeight: root.style === "bubble" ? dateSquareSize : 0 - color: Appearance.colors.colTertiaryContainer - radius: Appearance.rounding.verylarge + Item { + width: root.style === "bubble" ? dateSquareSize : 0 + height: root.style === "bubble" ? dateSquareSize : 0 anchors { right: parent.right top: parent.top - topMargin: 5 + bottomMargin: 50 } - Behavior on implicitWidth { + Behavior on width { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - Behavior on implicitHeight { + Behavior on height { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } + MaterialCookie { + z: 5 + sides: 1 + anchors.centerIn: parent + color: Appearance.colors.colTertiaryContainer + implicitSize: root.style === "bubble" ? dateSquareSize : 0 + constantlyRotate: Config.options.background.clock.cookie.constantlyRotate + Behavior on implicitSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + } StyledText { + z: 6 anchors.centerIn: parent - text: DateTime.date.substring(8, 10) + text: DateTime.date.substring(5, 7) color: Appearance.colors.colTertiary opacity: root.style === "bubble" ? 1.0 : 0 font { From b9a92507d1cbecf14e7d92fb9c7eade524b824c1 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 19:30:09 +0300 Subject: [PATCH 070/125] fix right bubble show month number --- .../ii/modules/background/cookieClock/DateIndicator.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 2b95345a3..3fef66c82 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -163,7 +163,7 @@ Item { StyledText { z: 6 anchors.centerIn: parent - text: DateTime.date.substring(5, 7) + text: DateTime.date.substring(8, 10) color: Appearance.colors.colTertiary opacity: root.style === "bubble" ? 1.0 : 0 font { From 28e6da1bbcfeeb9c9df0a7e6598e41c9a75af07e Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 19:35:11 +0300 Subject: [PATCH 071/125] fix hourHand color --- .../quickshell/ii/modules/background/cookieClock/HourHand.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml index 17e88a500..a20352715 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -40,6 +40,7 @@ Item { border.color: root.color border.width: 4 + opacity: 0.5 Behavior on x { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) From 29bb41aff076b4411500cfbc3e3cfd5b4504f9b5 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 19:47:09 +0300 Subject: [PATCH 072/125] fix hourHand color (again) --- .../ii/modules/background/cookieClock/CookieClock.qml | 2 +- .../quickshell/ii/modules/background/cookieClock/HourHand.qml | 2 +- .../ii/modules/background/cookieClock/MinuteHand.qml | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index a1a33c472..efb034609 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -34,7 +34,7 @@ Item { property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer property color colOnBackground: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.5) - property color colHourHand: Appearance.colors.colPrimary + property color colHourHand: Appearance.colors.colPrimaryContainer property color colMinuteHand: Appearance.colors.colSecondary property color colSecondHand: Appearance.colors.colTertiary property color colOnHourHand: Appearance.colors.colOnPrimary diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml index a20352715..045a6aee9 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -40,7 +40,7 @@ Item { border.color: root.color border.width: 4 - opacity: 0.5 + Behavior on x { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml index 261932572..4ff37ae90 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml @@ -38,7 +38,8 @@ Item { height: root.handWidth radius: root.style === "classic" ? 2 : root.handWidth / 2 - color: root.color + color: Appearance.colors.colSecondary + opacity: 0.9 Behavior on height { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) From 35dadbb7c4ebab240f153ec16b16757ce85d2234 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 19:53:17 +0300 Subject: [PATCH 073/125] add animation to stroke hour hand --- .../ii/modules/background/cookieClock/HourHand.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml index 045a6aee9..da1d8060f 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -16,7 +16,13 @@ Item { property real handWidth: 16 property string style: "fill" property color color: Appearance.colors.colPrimary + + property real fillColorAlpha: root.style === "stroke" ? 0.0 : 1.0 // for animation + Behavior on fillColorAlpha { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) z: root.style === "fill" ? 3 : 1 @@ -36,7 +42,7 @@ Item { height: root.style === "classic" ? 8 : handWidth radius: root.style === "classic" ? 2 : handWidth / 2 - color : root.style === "stroke" ? "transparent" : root.color + color : Qt.rgba(root.color.r, root.color.g, root.color.b, fillColorAlpha) border.color: root.color border.width: 4 From 10e25fcd038f80435ce4beea477ecb26111af88e Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 22:24:49 +0300 Subject: [PATCH 074/125] fix z layer on timeColumn --- .../quickshell/ii/modules/background/cookieClock/TimeColumn.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml index 335fbaba0..bdab277e5 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml @@ -13,7 +13,7 @@ Column { property bool isEnabled: Config.options.background.clock.cookie.timeIndicators property color color: Appearance.colors.colOnSecondaryContainer - z: 1 + z: 0 spacing: -16 Repeater { From 48f054c80976770b64c6b028d8adccac2c853a0c Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 22:50:46 +0300 Subject: [PATCH 075/125] change classic minuteHand anim --- .../ii/modules/background/cookieClock/SecondHand.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml index e7bdb0e84..0ce587850 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml @@ -50,8 +50,8 @@ Item { Rectangle { // Dot on the classic style opacity: root.style === "classic" ? 1.0 : 0.0 - implicitHeight: 14 - implicitWidth: 14 + implicitHeight: root.style === "classic" ? 14 : 0 + implicitWidth: root.style === "classic" ? 14 : 0 color: root.color radius: Appearance.rounding.small anchors { @@ -62,5 +62,11 @@ Item { Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } + Behavior on implicitHeight { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } } } \ No newline at end of file From 4b6b27a8fd2a93f2b9ba563ae4e38ac7db442b83 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 23:05:03 +0300 Subject: [PATCH 076/125] add animation to 'rotating' date style --- .../ii/modules/background/cookieClock/DateIndicator.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 3fef66c82..c3ea8dc0b 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -20,7 +20,7 @@ Item { height: parent.height rotation: { if (!Config.options.time.secondPrecision) return 0; - return secondHandLoader.item.rotation + 45 // +45 degrees to align with minute hand + return (secondHandLoader.item.rotation + 45) + (opacity * 360); // +45 degrees to align text's center // (opacity * 360) for open/close anim } opacity: root.style === "rotating" ? 1.0 : 0 From cf303380b635bd82ebad3957452fdd394da9ef10 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Mon, 6 Oct 2025 23:07:55 +0300 Subject: [PATCH 077/125] remove 'rotating' animation (it was ugly imo) --- .../ii/modules/background/cookieClock/DateIndicator.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index c3ea8dc0b..0704fb870 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -20,7 +20,7 @@ Item { height: parent.height rotation: { if (!Config.options.time.secondPrecision) return 0; - return (secondHandLoader.item.rotation + 45) + (opacity * 360); // +45 degrees to align text's center // (opacity * 360) for open/close anim + return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center } opacity: root.style === "rotating" ? 1.0 : 0 From e86a0e23bbb3f3d7b5c02af79ea540b7f3f51814 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 7 Oct 2025 16:59:06 +0200 Subject: [PATCH 078/125] remove weird transparency --- .../quickshell/ii/modules/background/cookieClock/MinuteHand.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml index 4ff37ae90..dd80f5a4c 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml @@ -39,7 +39,6 @@ Item { radius: root.style === "classic" ? 2 : root.handWidth / 2 color: Appearance.colors.colSecondary - opacity: 0.9 Behavior on height { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) From a77b7f7b66a10d7d9ac061d14acdd13c7edbc451 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:24:22 +0200 Subject: [PATCH 079/125] make MinuteMarks not rely on cascading --- .../background/cookieClock/CookieClock.qml | 5 +++ .../background/cookieClock/DateIndicator.qml | 3 +- .../background/cookieClock/MinuteMarks.qml | 33 ++++++++++++------- .../quickshell/ii/modules/common/Config.qml | 10 +++--- .../ii/modules/settings/InterfaceConfig.qml | 2 +- 5 files changed, 33 insertions(+), 20 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index efb034609..22f654dd0 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -72,6 +72,11 @@ Item { // Hour/minutes numbers/dots/lines MinuteMarks { anchors.fill: parent + property int hourDotSize: root.hourDotSize + property int hourNumberSize: root.hourNumberSize + property int hourLineSize: root.hourLineSize + property int minuteLineSize: root.minuteLineSize + color: root.colOnBackground } HourMarks { anchors.centerIn: parent diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 0704fb870..f16f0c0cb 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -16,8 +16,7 @@ Item { Canvas { z: 0 - width: parent.width - height: parent.height + anchors.fill: parent rotation: { if (!Config.options.time.secondPrecision) return 0; return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml index af29f426d..1ecb422e0 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml @@ -8,11 +8,20 @@ import qs.modules.common.functions import QtQuick Item { + id: root + + property int hourDotSize: 16 + property int hourNumberSize: 80 + property int hourLineSize: 8 + property int minuteLineSize: 4 + property color color: Appearance.colors.colOnSecondaryContainer + property string style: Config.options.background.clock.cookie.dialNumberStyle // "dots", "numbers", "full", "hide" + Repeater { model: 12 Item { required property int index - opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 + opacity: root.style === "dots" ? 1.0 : 0 rotation: 360 / 12 * index anchors.fill: parent Behavior on opacity { @@ -22,7 +31,7 @@ Item { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 10 : 50 + leftMargin: root.style === "dots" ? 10 : 50 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) @@ -30,7 +39,7 @@ Item { implicitWidth: root.hourDotSize implicitHeight: implicitWidth radius: implicitWidth / 2 - color: root.colOnBackground + color: root.color opacity: 0.5 } } @@ -41,7 +50,7 @@ Item { model: 4 Item { required property int index - opacity: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 1.0 : 0 + opacity: root.style === "numbers" ? 1.0 : 0 rotation: 360 / 4 * index anchors.fill: parent Behavior on opacity { @@ -54,13 +63,13 @@ Item { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 32 : 96 + leftMargin: root.style === "numbers" ? 32 : 96 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } StyledText { - color: root.colOnBackground + color: root.color anchors.centerIn: parent text: index === 0 ? "9" : index === 1 ? "12" : @@ -83,7 +92,7 @@ Item { required property int index rotation: 360 / 12 * index anchors.fill: parent - opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 + opacity: root.style === "full" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } @@ -91,11 +100,11 @@ Item { implicitWidth: root.hourLineSize * 3.5 implicitHeight: root.hourLineSize radius: implicitWidth / 2 - color: root.colOnBackground + color: root.color anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 + leftMargin: root.style === "full" ? 10 : 50 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) @@ -110,7 +119,7 @@ Item { required property int index rotation: 360 / 60 * index anchors.fill: parent - opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 + opacity: root.style === "full" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } @@ -118,12 +127,12 @@ Item { implicitWidth: root.minuteLineSize * 3.5 implicitHeight: root.minuteLineSize radius: implicitWidth / 2 - color: root.colOnBackground + color: root.color opacity: 0.5 anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 + leftMargin: root.style === "full" ? 10 : 50 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 5efc2a1ec..72e5ee721 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -131,11 +131,11 @@ Singleton { property real scale: 1 property int clockSides: 12 property JsonObject cookie: JsonObject { - property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" - property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" - property string minuteHandStyle: "medium" // Options: "classic", "thin", "medium", "bold", "hide" - property string secondHandStyle: "dot" // Options: "dot", "line" , "none" - property string dateStyle: "rotating" // Options: "rotating", "rect", "bubble" , "none" + property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" + property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" + property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide" + property string secondHandStyle: "dot" // Options: "dot", "line" , "none" + property string dateStyle: "rotating" // Options: "rotating", "rect", "bubble" , "none" property bool timeIndicators: true property bool hourMarks: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 430ec6c40..273948d7d 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -58,7 +58,7 @@ ContentPage { ContentSubsection { visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Dial number style") + title: Translation.tr("Dial numbers style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.dialNumberStyle onSelected: newValue => { From 945deafa63c2a48208708d435f4036bab828fe57 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:30:43 +0200 Subject: [PATCH 080/125] MinuteMarks: resolve some unqualified access --- .../ii/modules/background/cookieClock/MinuteMarks.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml index 1ecb422e0..6ac1a3e0d 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml @@ -49,6 +49,7 @@ Item { Repeater { model: 4 Item { + id: numberItem required property int index opacity: root.style === "numbers" ? 1.0 : 0 rotation: 360 / 4 * index @@ -71,10 +72,10 @@ Item { StyledText { color: root.color anchors.centerIn: parent - text: index === 0 ? "9" : - index === 1 ? "12" : - index === 2 ? "3" : "6" - rotation: index % 2 === 0 ? index * 90 : -index * 90 //A better way can be found to show texts on right angle + text: numberItem.index === 0 ? "9" : + numberItem.index === 1 ? "12" : + numberItem.index === 2 ? "3" : "6" + rotation: numberItem.index % 2 === 0 ? numberItem.index * 90 : -numberItem.index * 90 //A better way can be found to show texts on right angle font { family: Appearance.font.family.reading pixelSize: 80 From 737dd01c8de68909d44bec5a937c6d13c9ea69c2 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:31:07 +0200 Subject: [PATCH 081/125] make MinuteHand not rely on cascading --- .../ii/modules/background/cookieClock/CookieClock.qml | 1 + .../ii/modules/background/cookieClock/MinuteHand.qml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 22f654dd0..2f1a6198a 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -107,6 +107,7 @@ Item { MinuteHand { anchors.fill: parent handWidth: root.minuteHandWidth + handLength: root.minuteHandLength clockMinute: root.clockMinute style: Config.options.background.clock.cookie.minuteHandStyle color: root.colMinuteHand diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml index dd80f5a4c..218f4c72a 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml @@ -13,6 +13,7 @@ Item { required property int clockMinute property real handWidth: 16 + property real handLength: 95 property string style: "medium" property color color: Appearance.colors.colSecondary @@ -34,7 +35,7 @@ Item { if (root.style === "classic") position -= 15; return position; } - width: minuteHandLength + width: root.handLength height: root.handWidth radius: root.style === "classic" ? 2 : root.handWidth / 2 From c70b8f7aa2b722dfd925c97fe380d816303011b3 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:33:18 +0200 Subject: [PATCH 082/125] fix unqualified access in HourHand --- .../ii/modules/background/cookieClock/HourHand.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml index da1d8060f..01e6bae21 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -34,14 +34,14 @@ Item { Rectangle { anchors.verticalCenter: parent.verticalCenter x: { - let position = parent.width / 2 - handWidth / 2; + let position = parent.width / 2 - root.handWidth / 2; if (root.style === "classic") position -= 15; return position; } width: hourHandLength - height: root.style === "classic" ? 8 : handWidth + height: root.style === "classic" ? 8 : root.handWidth - radius: root.style === "classic" ? 2 : handWidth / 2 + radius: root.style === "classic" ? 2 : root.handWidth / 2 color : Qt.rgba(root.color.r, root.color.g, root.color.b, fillColorAlpha) border.color: root.color From d70e5c396fab015478a72f32afa6d47dc2bea45d Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:43:37 +0200 Subject: [PATCH 083/125] date indicator: put each style in a loader --- .../background/cookieClock/CookieClock.qml | 1 + .../background/cookieClock/DateIndicator.qml | 230 +++++++++--------- 2 files changed, 121 insertions(+), 110 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 2f1a6198a..db5da0210 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -149,6 +149,7 @@ Item { anchors.fill: parent colOnBackground: root.colOnBackground style: Config.options.background.clock.cookie.dateStyle + dateSquareSize: root.dateSquareSize } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index f16f0c0cb..f9824bae3 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -11,167 +11,177 @@ Item { id: root property string style: "rotating" property color colOnBackground: Appearance.colors.colOnSecondaryContainer - property color colOnSecondary: Appearance.colors.colOnSecondaryContainer - + property color colBackground: Appearance.colors.colOnSecondaryContainer + property real dateSquareSize: 64 - Canvas { - z: 0 + Loader { anchors.fill: parent - rotation: { - if (!Config.options.time.secondPrecision) return 0; - return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center - } - opacity: root.style === "rotating" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - - onPaint: { - var ctx = getContext("2d"); - ctx.clearRect(0, 0, width, height); - ctx.font = "700 30px " + Appearance.font.family.title; - var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); - var radius = 78; - var angleStep = Math.PI / 2.35 / text.length; + active: opacity > 0 + sourceComponent: Canvas { + z: 0 + rotation: { + if (!Config.options.time.secondPrecision) + return 0; + return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center + } - for (var i = 0; i < text.length; i++) { - var angle = i * angleStep - Math.PI / 2; - var x = width / 2 + radius * Math.cos(angle); - var y = height / 2 + radius * Math.sin(angle); + onPaint: { + var ctx = getContext("2d"); + ctx.clearRect(0, 0, width, height); + ctx.font = "700 30px " + Appearance.font.family.title; - ctx.save(); - ctx.translate(x, y); - ctx.rotate(angle + Math.PI / 2); + var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); + var radius = 78; + var angleStep = Math.PI / 2.35 / text.length; - if (i >= 3) - ctx.fillStyle = root.colOnBackground; - else - ctx.fillStyle = Appearance.colors.colSecondaryHover; + for (var i = 0; i < text.length; i++) { + var angle = i * angleStep - Math.PI / 2; + var x = width / 2 + radius * Math.cos(angle); + var y = height / 2 + radius * Math.sin(angle); - ctx.fillText(text[i], 0, 0); - ctx.restore(); + ctx.save(); + ctx.translate(x, y); + ctx.rotate(angle + Math.PI / 2); + + if (i >= 3) + ctx.fillStyle = root.colOnBackground; + else + ctx.fillStyle = Appearance.colors.colSecondaryHover; + + ctx.fillText(text[i], 0, 0); + ctx.restore(); + } } } } // Square date (only today's number) in right side of the clock - Rectangle { - z: 1 - implicitWidth: root.style === "rect" ? 45 : 0 - implicitHeight: root.style === "rect" ? 30 : 0 - color: root.colOnSecondary - radius: Appearance.rounding.small + Loader { anchors { verticalCenter: parent.verticalCenter right: parent.right rightMargin: 10 } - Behavior on implicitHeight { + width: root.style === "rect" ? 45 : 0 + height: root.style === "rect" ? 30 : 0 + Behavior on width { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - Behavior on implicitWidth { + Behavior on height { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - StyledText { - opacity: root.style === "rect" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - anchors.centerIn: parent - color: Appearance.colors.colSecondaryHover - text: DateTime.date.substring(5, 7) - font { - family: Appearance.font.family.expressive - pixelSize: 20 - weight: 1000 + active: height > 0 + sourceComponent: Rectangle { + z: 1 + color: root.colBackground + radius: Appearance.rounding.small + StyledText { + opacity: root.style === "rect" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + anchors.centerIn: parent + color: Appearance.colors.colSecondaryHover + text: DateTime.date.substring(5, 7) + font { + family: Appearance.font.family.expressive + pixelSize: 20 + weight: 1000 + } } } } // Date bubble style left side - Item { - width: root.style === "bubble" ? dateSquareSize : 0 - height: root.style === "bubble" ? dateSquareSize : 0 + Loader { anchors { left: parent.left bottom: parent.bottom topMargin: 50 } - Behavior on width { + property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 + width: targetSize + height: targetSize + Behavior on targetSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - Behavior on height { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - MaterialCookie { - z: 5 - sides: 4 - anchors.centerIn: parent - color: Appearance.colors.colPrimaryContainer - implicitSize: root.style === "bubble" ? dateSquareSize : 0 - constantlyRotate: Config.options.background.clock.cookie.constantlyRotate - Behavior on implicitSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + active: targetSize > 0 + sourceComponent: Item { + MaterialCookie { + z: 5 + sides: 4 + anchors.centerIn: parent + color: Appearance.colors.colPrimaryContainer + implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 + constantlyRotate: Config.options.background.clock.cookie.constantlyRotate + Behavior on implicitSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } } - } - StyledText { - z: 6 - anchors.centerIn: parent - text: DateTime.date.substring(5, 7) - color: Appearance.colors.colPrimary - opacity: root.style === "bubble" ? 1.0 : 0 - font { - family: Appearance.font.family.expressive - pixelSize: 30 - weight: 1000 - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + StyledText { + z: 6 + anchors.centerIn: parent + text: DateTime.date.substring(5, 7) + color: Appearance.colors.colPrimary + opacity: root.style === "bubble" ? 1.0 : 0 + font { + family: Appearance.font.family.expressive + pixelSize: 30 + weight: 1000 + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } } } } // Date bubble style right side - Item { - width: root.style === "bubble" ? dateSquareSize : 0 - height: root.style === "bubble" ? dateSquareSize : 0 + Loader { anchors { right: parent.right top: parent.top bottomMargin: 50 } - Behavior on width { + property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 + width: targetSize + height: targetSize + Behavior on targetSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - Behavior on height { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - MaterialCookie { - z: 5 - sides: 1 - anchors.centerIn: parent - color: Appearance.colors.colTertiaryContainer - implicitSize: root.style === "bubble" ? dateSquareSize : 0 - constantlyRotate: Config.options.background.clock.cookie.constantlyRotate - Behavior on implicitSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + + active: targetSize > 0 + sourceComponent: Item { + MaterialCookie { + z: 5 + sides: 1 + anchors.centerIn: parent + color: Appearance.colors.colTertiaryContainer + implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 + constantlyRotate: Config.options.background.clock.cookie.constantlyRotate + Behavior on implicitSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } } - } - StyledText { - z: 6 - anchors.centerIn: parent - text: DateTime.date.substring(8, 10) - color: Appearance.colors.colTertiary - opacity: root.style === "bubble" ? 1.0 : 0 - font { - family: Appearance.font.family.expressive - pixelSize: 30 - weight: 1000 - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + StyledText { + z: 6 + anchors.centerIn: parent + text: DateTime.date.substring(8, 10) + color: Appearance.colors.colTertiary + opacity: root.style === "bubble" ? 1.0 : 0 + font { + family: Appearance.font.family.expressive + pixelSize: 30 + weight: 1000 + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } } } } From f74a4f056e106a6302e8bf3010b64a5584825b2a Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Tue, 7 Oct 2025 20:13:37 +0300 Subject: [PATCH 084/125] refractor each date indicator to a new file --- .../background/cookieClock/CookieClock.qml | 2 + .../background/cookieClock/DateIndicator.qml | 188 ------------------ .../cookieClock/dateIndicators/BubbleDate.qml | 38 ++++ .../dateIndicators/DateIndicator.qml | 94 +++++++++ .../dateIndicators/RectangleDate.qml | 27 +++ .../dateIndicators/RotatingDate.qml | 44 ++++ 6 files changed, 205 insertions(+), 188 deletions(-) delete mode 100644 .config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index db5da0210..9dc74d790 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -9,6 +9,8 @@ import QtQuick import QtQuick.Layouts import Qt5Compat.GraphicalEffects +import "./dateIndicators" + Item { id: root diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml deleted file mode 100644 index f9824bae3..000000000 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ /dev/null @@ -1,188 +0,0 @@ -pragma ComponentBehavior: Bound - -import qs -import qs.services -import qs.modules.common -import qs.modules.common.widgets -import qs.modules.common.functions -import QtQuick - -Item { - id: root - property string style: "rotating" - property color colOnBackground: Appearance.colors.colOnSecondaryContainer - property color colBackground: Appearance.colors.colOnSecondaryContainer - property real dateSquareSize: 64 - - Loader { - anchors.fill: parent - opacity: root.style === "rotating" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - - active: opacity > 0 - sourceComponent: Canvas { - z: 0 - rotation: { - if (!Config.options.time.secondPrecision) - return 0; - return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center - } - - onPaint: { - var ctx = getContext("2d"); - ctx.clearRect(0, 0, width, height); - ctx.font = "700 30px " + Appearance.font.family.title; - - var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); - var radius = 78; - var angleStep = Math.PI / 2.35 / text.length; - - for (var i = 0; i < text.length; i++) { - var angle = i * angleStep - Math.PI / 2; - var x = width / 2 + radius * Math.cos(angle); - var y = height / 2 + radius * Math.sin(angle); - - ctx.save(); - ctx.translate(x, y); - ctx.rotate(angle + Math.PI / 2); - - if (i >= 3) - ctx.fillStyle = root.colOnBackground; - else - ctx.fillStyle = Appearance.colors.colSecondaryHover; - - ctx.fillText(text[i], 0, 0); - ctx.restore(); - } - } - } - } - - // Square date (only today's number) in right side of the clock - Loader { - anchors { - verticalCenter: parent.verticalCenter - right: parent.right - rightMargin: 10 - } - width: root.style === "rect" ? 45 : 0 - height: root.style === "rect" ? 30 : 0 - Behavior on width { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on height { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - active: height > 0 - sourceComponent: Rectangle { - z: 1 - color: root.colBackground - radius: Appearance.rounding.small - StyledText { - opacity: root.style === "rect" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - anchors.centerIn: parent - color: Appearance.colors.colSecondaryHover - text: DateTime.date.substring(5, 7) - font { - family: Appearance.font.family.expressive - pixelSize: 20 - weight: 1000 - } - } - } - } - - // Date bubble style left side - Loader { - anchors { - left: parent.left - bottom: parent.bottom - topMargin: 50 - } - property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 - width: targetSize - height: targetSize - Behavior on targetSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - active: targetSize > 0 - sourceComponent: Item { - MaterialCookie { - z: 5 - sides: 4 - anchors.centerIn: parent - color: Appearance.colors.colPrimaryContainer - implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 - constantlyRotate: Config.options.background.clock.cookie.constantlyRotate - Behavior on implicitSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } - StyledText { - z: 6 - anchors.centerIn: parent - text: DateTime.date.substring(5, 7) - color: Appearance.colors.colPrimary - opacity: root.style === "bubble" ? 1.0 : 0 - font { - family: Appearance.font.family.expressive - pixelSize: 30 - weight: 1000 - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } - - // Date bubble style right side - Loader { - anchors { - right: parent.right - top: parent.top - bottomMargin: 50 - } - property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 - width: targetSize - height: targetSize - Behavior on targetSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - - active: targetSize > 0 - sourceComponent: Item { - MaterialCookie { - z: 5 - sides: 1 - anchors.centerIn: parent - color: Appearance.colors.colTertiaryContainer - implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 - constantlyRotate: Config.options.background.clock.cookie.constantlyRotate - Behavior on implicitSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } - StyledText { - z: 6 - anchors.centerIn: parent - text: DateTime.date.substring(8, 10) - color: Appearance.colors.colTertiary - opacity: root.style === "bubble" ? 1.0 : 0 - font { - family: Appearance.font.family.expressive - pixelSize: 30 - weight: 1000 - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } -} diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml new file mode 100644 index 000000000..41c8ca85e --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml @@ -0,0 +1,38 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import QtQuick + +Item { + property int bubbleIndex: 0 + + MaterialCookie { + z: 5 + sides: 4 + anchors.centerIn: parent + color: bubbleIndex === 0.0 ? Appearance.colors.colPrimaryContainer : Appearance.colors.colTertiaryContainer + implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 + constantlyRotate: Config.options.background.clock.cookie.constantlyRotate + Behavior on implicitSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + } + StyledText { + z: 6 + anchors.centerIn: parent + text: bubbleIndex === 0.0 ? DateTime.date.substring(5, 7) : DateTime.date.substring(8, 10) + color: bubbleIndex === 0.0 ? Appearance.colors.colPrimary : Appearance.colors.colTertiary + opacity: root.style === "bubble" ? 1.0 : 0 + font { + family: Appearance.font.family.expressive + pixelSize: 30 + weight: 1000 + } + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } +} \ No newline at end of file diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml new file mode 100644 index 000000000..465a5751e --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -0,0 +1,94 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import qs.modules.common.functions +import QtQuick + +Item { + id: root + property string style: "rotating" + property color colOnBackground: Appearance.colors.colOnSecondaryContainer + property color colBackground: Appearance.colors.colOnSecondaryContainer + property real dateSquareSize: 64 + + // Rotating date + Loader { + opacity: root.style === "rotating" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + + anchors.fill: parent + active: opacity > 0 + sourceComponent: RotatingDate {} + } + + // Square date (only today's number) in right side of the clock + Loader { + width: root.style === "rect" ? 45 : 0 + height: root.style === "rect" ? 30 : 0 + + Behavior on height { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + Behavior on width { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + + active: height > 0 + sourceComponent: RectangleDate {} + + anchors { + verticalCenter: parent.verticalCenter + right: parent.right + rightMargin: 10 + } + + } + + // Date bubble style day + Loader { + property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 + Behavior on targetSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + + active: targetSize > 0 + width: targetSize + height: targetSize + + anchors { + left: parent.left + bottom: parent.bottom + topMargin: 50 + } + sourceComponent: BubbleDate { + bubbleIndex: 0 + } + } + + // Date bubble month + Loader { + property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 + Behavior on targetSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + + width: targetSize + height: targetSize + active: targetSize > 0 + + + anchors { + right: parent.right + top: parent.top + bottomMargin: 50 + } + sourceComponent: BubbleDate { + bubbleIndex: 1 + } + } +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml new file mode 100644 index 000000000..a96e9ba07 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml @@ -0,0 +1,27 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import QtQuick + +Rectangle { + z: 1 + color: root.colBackground + radius: Appearance.rounding.small + StyledText { + opacity: root.style === "rect" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + anchors.centerIn: parent + color: Appearance.colors.colSecondaryHover + text: DateTime.date.substring(5, 7) + font { + family: Appearance.font.family.expressive + pixelSize: 20 + weight: 1000 + } + } +} \ No newline at end of file diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml new file mode 100644 index 000000000..70e282324 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml @@ -0,0 +1,44 @@ +pragma ComponentBehavior: Bound + +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import QtQuick + +Canvas { + z: 0 + rotation: { + if (!Config.options.time.secondPrecision) + return 0; + return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center + } + + onPaint: { + var ctx = getContext("2d"); + ctx.clearRect(0, 0, width, height); + ctx.font = "700 30px " + Appearance.font.family.title; + + var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); + var radius = 78; + var angleStep = Math.PI / 2.35 / text.length; + + for (var i = 0; i < text.length; i++) { + var angle = i * angleStep - Math.PI / 2; + var x = width / 2 + radius * Math.cos(angle); + var y = height / 2 + radius * Math.sin(angle); + + ctx.save(); + ctx.translate(x, y); + ctx.rotate(angle + Math.PI / 2); + + if (i >= 3) + ctx.fillStyle = root.colOnBackground; + else + ctx.fillStyle = Appearance.colors.colSecondaryHover; + + ctx.fillText(text[i], 0, 0); + ctx.restore(); + } + } +} \ No newline at end of file From 68ea59328eadef1659ce6da1f93e55b4d51fae42 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Tue, 7 Oct 2025 21:46:40 +0300 Subject: [PATCH 085/125] change 'rotating' dateStyle radius, fix bubble dateStyle --- .../cookieClock/dateIndicators/BubbleDate.qml | 2 +- .../dateIndicators/DateIndicator.qml | 18 +++++++----------- .../dateIndicators/RectangleDate.qml | 2 -- .../dateIndicators/RotatingDate.qml | 9 +++++++-- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml index 41c8ca85e..7479574ac 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml @@ -11,7 +11,7 @@ Item { MaterialCookie { z: 5 - sides: 4 + sides: bubbleIndex === 0 ? 4 : 1 anchors.centerIn: parent color: bubbleIndex === 0.0 ? Appearance.colors.colPrimaryContainer : Appearance.colors.colTertiaryContainer implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index 465a5751e..3e96dae05 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -16,11 +16,6 @@ Item { // Rotating date Loader { - opacity: root.style === "rotating" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - anchors.fill: parent active: opacity > 0 sourceComponent: RotatingDate {} @@ -39,17 +34,19 @@ Item { } active: height > 0 - sourceComponent: RectangleDate {} - anchors { verticalCenter: parent.verticalCenter right: parent.right rightMargin: 10 } - + + sourceComponent: RectangleDate { + color: root.colBackground + radius: Appearance.rounding.small + } } - // Date bubble style day + // Date bubble / day Loader { property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 Behavior on targetSize { @@ -70,7 +67,7 @@ Item { } } - // Date bubble month + // Date bubble / month Loader { property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 Behavior on targetSize { @@ -80,7 +77,6 @@ Item { width: targetSize height: targetSize active: targetSize > 0 - anchors { right: parent.right diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml index a96e9ba07..ac9e63bbc 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml @@ -8,8 +8,6 @@ import QtQuick Rectangle { z: 1 - color: root.colBackground - radius: Appearance.rounding.small StyledText { opacity: root.style === "rect" ? 1.0 : 0 Behavior on opacity { diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml index 70e282324..96c39fe5a 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml @@ -8,19 +8,24 @@ import QtQuick Canvas { z: 0 + + opacity: root.style === "rotating" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + rotation: { if (!Config.options.time.secondPrecision) return 0; return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center } - onPaint: { var ctx = getContext("2d"); ctx.clearRect(0, 0, width, height); ctx.font = "700 30px " + Appearance.font.family.title; var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); - var radius = 78; + var radius = 65; var angleStep = Math.PI / 2.35 / text.length; for (var i = 0; i < text.length; i++) { From 6c23d482dd7466a2824a1b5431a3a7ec1e2c2419 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 18:53:45 +0300 Subject: [PATCH 086/125] refactor 'rotating' date indicator with repeater/text --- .../background/cookieClock/MinuteMarks.qml | 8 ++- .../dateIndicators/RotatingDate.qml | 58 +++++++++---------- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml index 6ac1a3e0d..40ca0b3c7 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml @@ -16,6 +16,7 @@ Item { property int minuteLineSize: 4 property color color: Appearance.colors.colOnSecondaryContainer property string style: Config.options.background.clock.cookie.dialNumberStyle // "dots", "numbers", "full", "hide" + property string dateStyle : Config.options.background.clock.cookie.dateStyle Repeater { model: 12 @@ -64,7 +65,7 @@ Item { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: root.style === "numbers" ? 32 : 96 + leftMargin: root.style === "numbers" ? root.dateStyle === "rotating" ? 48 : 32 : 96 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) @@ -78,9 +79,12 @@ Item { rotation: numberItem.index % 2 === 0 ? numberItem.index * 90 : -numberItem.index * 90 //A better way can be found to show texts on right angle font { family: Appearance.font.family.reading - pixelSize: 80 + pixelSize: root.dateStyle === "rotating" ? 70 : 80 weight: 1000 } + Behavior on font.pixelSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } } } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml index 96c39fe5a..9ba30530e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml @@ -6,44 +6,42 @@ import qs.modules.common import qs.modules.common.widgets import QtQuick -Canvas { - z: 0 +Item { + id: root - opacity: root.style === "rotating" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } + property real radius: 65 + + property string dateText: Qt.locale().toString(DateTime.clock.date, "ddd dd") + property real angleStep: Math.PI / 2.35 / dateText.length + + property color dayColor: Appearance.colors.colSecondary + property color monthColor: Appearance.colors.colSecondaryHover rotation: { - if (!Config.options.time.secondPrecision) - return 0; - return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center + if (!Config.options.time.secondPrecision) return 0 + else return secondHandLoader.item.rotation + 45 // +45 to center the text } - onPaint: { - var ctx = getContext("2d"); - ctx.clearRect(0, 0, width, height); - ctx.font = "700 30px " + Appearance.font.family.title; - var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); - var radius = 65; - var angleStep = Math.PI / 2.35 / text.length; + Repeater { + model: root.dateText.length - for (var i = 0; i < text.length; i++) { - var angle = i * angleStep - Math.PI / 2; - var x = width / 2 + radius * Math.cos(angle); - var y = height / 2 + radius * Math.sin(angle); + delegate: Text { + required property int index + property real angle: index * root.angleStep - Math.PI / 2 - ctx.save(); - ctx.translate(x, y); - ctx.rotate(angle + Math.PI / 2); + x: root.width / 2 + root.radius * Math.cos(angle) - width / 2 + y: root.height / 2 + root.radius * Math.sin(angle) - height / 2 - if (i >= 3) - ctx.fillStyle = root.colOnBackground; - else - ctx.fillStyle = Appearance.colors.colSecondaryHover; + text: root.dateText.charAt(index) + + font.family: Appearance.font.family.title + font.pixelSize: 30 + font.weight: Font.DemiBold + + color: index < 3 ? root.dayColor : root.monthColor + + rotation: angle * 180 / Math.PI + 90 - ctx.fillText(text[i], 0, 0); - ctx.restore(); } } -} \ No newline at end of file +} From eeed075be22e61103f0ccf39b36e106677655642 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 19:00:21 +0300 Subject: [PATCH 087/125] make 'numbers' dial and 'rotating' date respect each other on position --- .../cookieClock/dateIndicators/DateIndicator.qml | 4 +++- .../cookieClock/dateIndicators/RotatingDate.qml | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index 3e96dae05..1c7bbebca 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -18,7 +18,9 @@ Item { Loader { anchors.fill: parent active: opacity > 0 - sourceComponent: RotatingDate {} + sourceComponent: RotatingDate { + style: root.style + } } // Square date (only today's number) in right side of the clock diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml index 9ba30530e..344f8058b 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml @@ -9,7 +9,13 @@ import QtQuick Item { id: root - property real radius: 65 + property string style: Config.options.background.clock.cookie.dateStyle + readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle + + property real radius: style === "rotating" ? dialStyle === "numbers" ? 90 : 65 : 0 + Behavior on radius { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } property string dateText: Qt.locale().toString(DateTime.clock.date, "ddd dd") property real angleStep: Math.PI / 2.35 / dateText.length @@ -17,6 +23,11 @@ Item { property color dayColor: Appearance.colors.colSecondary property color monthColor: Appearance.colors.colSecondaryHover + opacity: style === "rotating" ? 1.0 : 0.0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + rotation: { if (!Config.options.time.secondPrecision) return 0 else return secondHandLoader.item.rotation + 45 // +45 to center the text From 5c29ac8d1e83dc7048f256b211b1778479127f53 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 19:05:34 +0300 Subject: [PATCH 088/125] 'rotating' date also respects timeIndicators --- .../background/cookieClock/dateIndicators/RotatingDate.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml index 344f8058b..dc381d332 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml @@ -11,10 +11,11 @@ Item { property string style: Config.options.background.clock.cookie.dateStyle readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle + readonly property bool timeIndicators: Config.options.background.clock.cookie.timeIndicators - property real radius: style === "rotating" ? dialStyle === "numbers" ? 90 : 65 : 0 + property real radius: style === "rotating" ? dialStyle === "numbers" || timeIndicators ? 90 : 75 : 0 Behavior on radius { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } property string dateText: Qt.locale().toString(DateTime.clock.date, "ddd dd") From 4fb7f7c1e7b37cf1bc37d14af1356ef96c3df972 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 20:10:21 +0300 Subject: [PATCH 089/125] 'rect' date respects 'numbers' dial style position --- .../dateIndicators/DateIndicator.qml | 23 ++++++++----------- .../dateIndicators/RectangleDate.qml | 19 +++++++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index 1c7bbebca..943995ffc 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -9,6 +9,7 @@ import QtQuick Item { id: root + readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle property string style: "rotating" property color colOnBackground: Appearance.colors.colOnSecondaryContainer property color colBackground: Appearance.colors.colOnSecondaryContainer @@ -23,28 +24,22 @@ Item { } } - // Square date (only today's number) in right side of the clock + // Rectangle date (only today's number) in right side of the clock Loader { - width: root.style === "rect" ? 45 : 0 - height: root.style === "rect" ? 30 : 0 - - Behavior on height { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on width { + id: rectLoader + z: 0 + + property real animIndex: root.style === "rect" ? 1.0 : 0.0 + Behavior on animIndex { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - active: height > 0 - anchors { - verticalCenter: parent.verticalCenter - right: parent.right - rightMargin: 10 - } + active: animIndex > 0 sourceComponent: RectangleDate { color: root.colBackground radius: Appearance.rounding.small + animIndex: rectLoader.animIndex } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml index ac9e63bbc..67d5709e3 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml @@ -8,6 +8,25 @@ import QtQuick Rectangle { z: 1 + + readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle + + property real animIndex: 0 + opacity: animIndex + + width: 45 + height: 30 + + x: dialStyle === "numbers" ? 155 : 175 + y: dialStyle === "numbers" ? 155 : 100 + + Behavior on x { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on y { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + StyledText { opacity: root.style === "rect" ? 1.0 : 0 Behavior on opacity { From 19230db8b7f732246813c17ce78e0d6cad50ad97 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 20:30:30 +0300 Subject: [PATCH 090/125] fix 'rect' date z layer problem --- .../ii/modules/background/cookieClock/CookieClock.qml | 1 + .../background/cookieClock/dateIndicators/DateIndicator.qml | 3 +-- .../background/cookieClock/dateIndicators/RectangleDate.qml | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 9dc74d790..d5472369e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -120,6 +120,7 @@ Item { id: secondHandLoader active: Config.options.time.secondPrecision && Config.options.background.clock.cookie.secondHandStyle !== "none" anchors.fill: parent + z: 2 sourceComponent: SecondHand { id: secondHand handWidth: root.secondHandWidth diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index 943995ffc..850bc34f8 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -27,7 +27,6 @@ Item { // Rectangle date (only today's number) in right side of the clock Loader { id: rectLoader - z: 0 property real animIndex: root.style === "rect" ? 1.0 : 0.0 Behavior on animIndex { @@ -37,7 +36,7 @@ Item { active: animIndex > 0 sourceComponent: RectangleDate { - color: root.colBackground + color: Appearance.colors.colSecondaryContainerHover radius: Appearance.rounding.small animIndex: rectLoader.animIndex } diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml index 67d5709e3..c24222206 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml @@ -1,4 +1,3 @@ -pragma ComponentBehavior: Bound import qs import qs.services @@ -7,17 +6,14 @@ import qs.modules.common.widgets import QtQuick Rectangle { - z: 1 - readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle - property real animIndex: 0 opacity: animIndex width: 45 height: 30 - x: dialStyle === "numbers" ? 155 : 175 + x: dialStyle === "numbers" ? 155 : 150 y: dialStyle === "numbers" ? 155 : 100 Behavior on x { From 70f3a257981f313203aeafc59c35efbef3cd9cf9 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 21:16:14 +0300 Subject: [PATCH 091/125] add animation to 'rect' date style --- .../cookieClock/dateIndicators/DateIndicator.qml | 5 ++++- .../cookieClock/dateIndicators/RectangleDate.qml | 13 +++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index 850bc34f8..f1977117e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -27,7 +27,7 @@ Item { // Rectangle date (only today's number) in right side of the clock Loader { id: rectLoader - + property real animIndex: root.style === "rect" ? 1.0 : 0.0 Behavior on animIndex { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) @@ -35,6 +35,9 @@ Item { active: animIndex > 0 + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + sourceComponent: RectangleDate { color: Appearance.colors.colSecondaryContainerHover radius: Appearance.rounding.small diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml index c24222206..c2410c81e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml @@ -6,15 +6,16 @@ import qs.modules.common.widgets import QtQuick Rectangle { + id: rect readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle property real animIndex: 0 - opacity: animIndex + opacity: animIndex - width: 45 - height: 30 - - x: dialStyle === "numbers" ? 155 : 150 - y: dialStyle === "numbers" ? 155 : 100 + width: 45 * animIndex + height: 30 * animIndex + + x: root.dialStyle === "numbers" ? -40 : -10 + y: root.dialStyle === "numbers" ? 55 : 0 Behavior on x { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) From aa064fb6c5829dc102118af903c30710cf63dbed Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 22:21:50 +0300 Subject: [PATCH 092/125] fix: 'bubble' date indicator start animation not working --- .../background/cookieClock/dateIndicators/BubbleDate.qml | 6 ++---- .../background/cookieClock/dateIndicators/DateIndicator.qml | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml index 7479574ac..079c9650a 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml @@ -8,17 +8,15 @@ import QtQuick Item { property int bubbleIndex: 0 + property real targetSize: 0 MaterialCookie { z: 5 sides: bubbleIndex === 0 ? 4 : 1 anchors.centerIn: parent color: bubbleIndex === 0.0 ? Appearance.colors.colPrimaryContainer : Appearance.colors.colTertiaryContainer - implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 + implicitSize: targetSize constantlyRotate: Config.options.background.clock.cookie.constantlyRotate - Behavior on implicitSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } } StyledText { z: 6 diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index f1977117e..d2626d751 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -47,6 +47,7 @@ Item { // Date bubble / day Loader { + id: dayBubbleLoader property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 Behavior on targetSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) @@ -63,11 +64,13 @@ Item { } sourceComponent: BubbleDate { bubbleIndex: 0 + targetSize: dayBubbleLoader.targetSize } } // Date bubble / month Loader { + id: monthBubbleLoader property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 Behavior on targetSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) @@ -84,6 +87,7 @@ Item { } sourceComponent: BubbleDate { bubbleIndex: 1 + targetSize: monthBubbleLoader.targetSize } } } From 64455b594b1a86460ae851ad8c5cdff06c2a5f31 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 23:30:21 +0300 Subject: [PATCH 093/125] add cookie quote again (you can revert this if you dont want) --- .../ii/modules/background/Background.qml | 9 +++ .../background/cookieClock/CookieQuote.qml | 62 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index 47962f514..69e249c9a 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -24,6 +24,7 @@ Variants { readonly property real clockSizePadding: 20 readonly property real screenSizePadding: 50 readonly property string clockStyle: Config.options.background.clock.style + readonly property bool showQuote: Config.options.background.showQuote && Config.options.background.quote !== "" model: Quickshell.screens PanelWindow { @@ -339,6 +340,14 @@ Variants { active: visible sourceComponent: CookieClock {} } + + Loader { + id: cookieQuoteLoader + visible: root.showQuote + active: visible + anchors.horizontalCenter: parent.horizontalCenter + sourceComponent: CookieQuote {} + } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml new file mode 100644 index 000000000..c3d83e511 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml @@ -0,0 +1,62 @@ +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import QtQuick +import QtQuick.Layouts +import Qt5Compat.GraphicalEffects + + +Item { + id: root + + readonly property string quoteText: Config.options.background.quote + + implicitWidth: quoteBox.implicitWidth + implicitHeight: quoteBox.implicitHeight + + anchors.bottom: parent.bottom + anchors.bottomMargin: -24 + + DropShadow { + source: quoteBox + anchors.fill: quoteBox + horizontalOffset: 0 + verticalOffset: 2 + radius: 12 + samples: radius * 2 + 1 + color: root.colShadow + transparentBorder: true + } + + Rectangle { + id: quoteBox + + implicitWidth: quoteStyledText.width + quoteIcon.width + 16 // for spacing on both sides + implicitHeight: quoteStyledText.height + 8 + radius: Appearance.rounding.small + color: Appearance.colors.colSecondaryContainer + RowLayout { + anchors.centerIn: parent + spacing: 4 + MaterialSymbol { + id: quoteIcon + iconSize: Appearance.font.pixelSize.huge + text: "comic_bubble" + color: Appearance.colors.colOnSecondaryContainer + } + StyledText { + id: quoteStyledText + Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter + text: Config.options.background.quote + font { + family: Appearance.font.family.main + pixelSize: Appearance.font.pixelSize.large + weight: Font.Normal + italic: true + } + } + } + } +} \ No newline at end of file From 74787f89278e8fef26fcc0aeed6769fead910e73 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 23:34:32 +0300 Subject: [PATCH 094/125] center the cookie quote correctly --- .config/quickshell/ii/modules/background/Background.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index 69e249c9a..9db9d8b26 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -345,8 +345,8 @@ Variants { id: cookieQuoteLoader visible: root.showQuote active: visible - anchors.horizontalCenter: parent.horizontalCenter sourceComponent: CookieQuote {} + anchors.horizontalCenter: cookieClockLoader.horizontalCenter } } From a35d128bb54b1d79fbe07a2fee7ba2ab369e0379 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 23:45:00 +0300 Subject: [PATCH 095/125] fix: cookie quote shadow color --- .../ii/modules/background/cookieClock/CookieQuote.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml index c3d83e511..39afa2004 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml @@ -25,7 +25,7 @@ Item { verticalOffset: 2 radius: 12 samples: radius * 2 + 1 - color: root.colShadow + color: Appearance.colors.colShadow transparentBorder: true } From 28b47b25ea4b381af1696415b0a6eb444bef7724 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Thu, 9 Oct 2025 17:06:41 +0300 Subject: [PATCH 096/125] fix: hide cookie quote on lock screen --- .config/quickshell/ii/modules/background/Background.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index 9db9d8b26..bee91738f 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -24,7 +24,7 @@ Variants { readonly property real clockSizePadding: 20 readonly property real screenSizePadding: 50 readonly property string clockStyle: Config.options.background.clock.style - readonly property bool showQuote: Config.options.background.showQuote && Config.options.background.quote !== "" + readonly property bool showQuote: Config.options.background.showQuote && Config.options.background.quote !== "" && !GlobalStates.screenLocked model: Quickshell.screens PanelWindow { From 3bf6f7ca095a5b1031b691f623ac38a4f40e907f Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Thu, 9 Oct 2025 17:45:04 +0300 Subject: [PATCH 097/125] fix: hide cookie quote on digital (am i blind or smthn?) --- .config/quickshell/ii/modules/background/Background.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index bee91738f..9e39dd275 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -24,7 +24,7 @@ Variants { readonly property real clockSizePadding: 20 readonly property real screenSizePadding: 50 readonly property string clockStyle: Config.options.background.clock.style - readonly property bool showQuote: Config.options.background.showQuote && Config.options.background.quote !== "" && !GlobalStates.screenLocked + readonly property bool showCookieQuote: Config.options.background.showQuote && Config.options.background.quote !== "" && !GlobalStates.screenLocked && Config.options.background.clock.style === "cookie" model: Quickshell.screens PanelWindow { @@ -343,7 +343,7 @@ Variants { Loader { id: cookieQuoteLoader - visible: root.showQuote + visible: root.showCookieQuote active: visible sourceComponent: CookieQuote {} anchors.horizontalCenter: cookieClockLoader.horizontalCenter From fe19cea6c9720b82cb3039a4b10ab4776fd709d8 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 10 Oct 2025 23:33:21 +0200 Subject: [PATCH 098/125] search: add prefix for app search --- .../quickshell/ii/modules/common/Config.qml | 1 + .../modules/common/functions/StringUtils.qml | 28 +++++++++++++++ .../ii/modules/overview/SearchWidget.qml | 35 +++++++++++-------- 3 files changed, 50 insertions(+), 14 deletions(-) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index ea99949d5..e226803a3 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -315,6 +315,7 @@ Singleton { property JsonObject prefix: JsonObject { property bool showDefaultActionsWithoutPrefix: true property string action: "/" + property string app: ">" property string clipboard: ";" property string emojis: ":" property string math: "=" diff --git a/.config/quickshell/ii/modules/common/functions/StringUtils.qml b/.config/quickshell/ii/modules/common/functions/StringUtils.qml index d3158a46c..88ab95b2d 100644 --- a/.config/quickshell/ii/modules/common/functions/StringUtils.qml +++ b/.config/quickshell/ii/modules/common/functions/StringUtils.qml @@ -257,4 +257,32 @@ Singleton { } return false; } + + /** + * Removes the given prefix from the string if present. + * @param { string } str + * @param { string } prefix + * @returns { string } + */ + function cleanPrefix(str, prefix) { + if (str.startsWith(prefix)) { + return str.slice(prefix.length); + } + return str; + } + + /** + * Removes the first matching prefix from the string if present. + * @param { string } str + * @param { string[] } prefixes + * @returns { string } + */ + function cleanOnePrefix(str, prefixes) { + for (let i = 0; i < prefixes.length; ++i) { + if (str.startsWith(prefixes[i])) { + return str.slice(prefixes[i].length); + } + } + return str; + } } diff --git a/.config/quickshell/ii/modules/overview/SearchWidget.qml b/.config/quickshell/ii/modules/overview/SearchWidget.qml index e58a300d0..3121773d5 100644 --- a/.config/quickshell/ii/modules/overview/SearchWidget.qml +++ b/.config/quickshell/ii/modules/overview/SearchWidget.qml @@ -327,7 +327,7 @@ Item { // Wrapper ///////////// Special cases /////////////// if (root.searchingText.startsWith(Config.options.search.prefix.clipboard)) { // Clipboard - const searchString = root.searchingText.slice(Config.options.search.prefix.clipboard.length); + const searchString = StringUtils.cleanPrefix(root.searchingText, Config.options.search.prefix.clipboard); return Cliphist.fuzzyQuery(searchString).map((entry, index, array) => { const mightBlurImage = Cliphist.entryIsImage(entry) && root.clipboardWorkSafetyActive; let shouldBlurImage = mightBlurImage; @@ -365,7 +365,7 @@ Item { // Wrapper } else if (root.searchingText.startsWith(Config.options.search.prefix.emojis)) { // Clipboard - const searchString = root.searchingText.slice(Config.options.search.prefix.emojis.length); + const searchString = StringUtils.cleanPrefix(root.searchingText, Config.options.search.prefix.emojis); return Emojis.fuzzyQuery(searchString).map(entry => { return { cliphistRawString: entry, @@ -392,14 +392,20 @@ Item { // Wrapper Quickshell.clipboardText = root.mathResult; } }; + const appResultObjects = AppSearch.fuzzyQuery(StringUtils.cleanPrefix(root.searchingText, Config.options.search.prefix.app)).map(entry => { + entry.clickActionName = Translation.tr("Launch"); + entry.type = Translation.tr("App"); + return entry; + }) const commandResultObject = { - name: searchingText.replace("file://", ""), + name: StringUtils.cleanPrefix(root.searchingText, Config.options.search.prefix.shellCommand).replace("file://", ""), clickActionName: Translation.tr("Run"), type: Translation.tr("Run command"), fontType: "monospace", materialSymbol: 'terminal', execute: () => { let cleanedCommand = root.searchingText.replace("file://", ""); + cleanedCommand = StringUtils.cleanPrefix(cleanedCommand, Config.options.search.prefix.shellCommand); if (cleanedCommand.startsWith(Config.options.search.prefix.shellCommand)) { cleanedCommand = cleanedCommand.slice(Config.options.search.prefix.shellCommand.length); } @@ -407,15 +413,12 @@ Item { // Wrapper } }; const webSearchResultObject = { - name: root.searchingText, + name: StringUtils.cleanPrefix(root.searchingText, Config.options.search.prefix.webSearch), clickActionName: Translation.tr("Search"), type: Translation.tr("Search the web"), materialSymbol: 'travel_explore', execute: () => { - let query = root.searchingText; - if (query.startsWith(Config.options.search.prefix.webSearch)) { - query = query.slice(Config.options.search.prefix.webSearch.length); - } + let query = StringUtils.cleanPrefix(root.searchingText, Config.options.search.prefix.webSearch); let url = Config.options.search.engineBaseUrl + query; for (let site of Config.options.search.excludedSites) { url += ` -site:${site}`; @@ -454,11 +457,7 @@ Item { // Wrapper } //////////////// Apps ////////////////// - result = result.concat(AppSearch.fuzzyQuery(root.searchingText).map(entry => { - entry.clickActionName = Translation.tr("Launch"); - entry.type = Translation.tr("App"); - return entry; - })); + result = result.concat(appResultObjects); ////////// Launcher actions //////////// result = result.concat(launcherActionObjects); @@ -480,7 +479,15 @@ Item { // Wrapper anchors.left: parent?.left anchors.right: parent?.right entry: modelData - query: root.searchingText.startsWith(Config.options.search.prefix.clipboard) ? root.searchingText.slice(Config.options.search.prefix.clipboard.length) : root.searchingText + query: StringUtils.cleanOnePrefix(root.searchingText, [ + Config.options.search.prefix.action, + Config.options.search.prefix.app, + Config.options.search.prefix.clipboard, + Config.options.search.prefix.emojis, + Config.options.search.prefix.math, + Config.options.search.prefix.shellCommand, + Config.options.search.prefix.webSearch + ]) } } } From bd90e2c19e4e56961ba98b867850aac39547e6e1 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 10 Oct 2025 23:47:27 +0200 Subject: [PATCH 099/125] bar: fix tray overflow menu showing when empty --- .config/quickshell/ii/modules/bar/SysTray.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/bar/SysTray.qml b/.config/quickshell/ii/modules/bar/SysTray.qml index 8da341192..2a6259a97 100644 --- a/.config/quickshell/ii/modules/bar/SysTray.qml +++ b/.config/quickshell/ii/modules/bar/SysTray.qml @@ -101,7 +101,7 @@ Item { StyledPopup { id: overflowPopup hoverTarget: trayOverflowButton - active: root.trayOverflowOpen + active: root.trayOverflowOpen && root.unpinnedItems.length > 0 popupBackgroundMargin: 300 // This should be plenty... makes sure tooltips don't get cutoff (easily) GridLayout { From 393d90d3f7ba5e6c8db3abb2fbecae31bc44196f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 10 Oct 2025 23:58:45 +0200 Subject: [PATCH 100/125] fix colors not applied properly on first run --- .../ii/services/MaterialThemeLoader.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.config/quickshell/ii/services/MaterialThemeLoader.qml b/.config/quickshell/ii/services/MaterialThemeLoader.qml index 8872c476e..cd85323e5 100644 --- a/.config/quickshell/ii/services/MaterialThemeLoader.qml +++ b/.config/quickshell/ii/services/MaterialThemeLoader.qml @@ -32,6 +32,21 @@ Singleton { Appearance.m3colors.darkmode = (Appearance.m3colors.m3background.hslLightness < 0.5) } + function resetFilePathNextTime() { + resetFilePathNextWallpaperChange.enabled = true + } + + Connections { + id: resetFilePathNextWallpaperChange + enabled: false + target: Config.options.background + onWallpaperPathChanged: { + root.filePath = "" + root.filePath = Directories.generatedMaterialThemePath + resetFilePathNextWallpaperChange.enabled = false + } + } + Timer { id: delayedFileRead interval: Config.options?.hacks?.arbitraryRaceConditionDelay ?? 100 @@ -54,5 +69,6 @@ Singleton { const fileContent = themeFileView.text() root.applyColors(fileContent) } + onLoadFailed: root.resetFilePathNextTime(); } } From 01f86316639631c933c344bb9ea40a22eaff3ccd Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 00:03:18 +0200 Subject: [PATCH 101/125] disallow volume over 200% --- .config/quickshell/ii/services/Audio.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/services/Audio.qml b/.config/quickshell/ii/services/Audio.qml index 0651ebc70..f0c471910 100644 --- a/.config/quickshell/ii/services/Audio.qml +++ b/.config/quickshell/ii/services/Audio.qml @@ -14,6 +14,7 @@ Singleton { property bool ready: Pipewire.defaultAudioSink?.ready ?? false property PwNode sink: Pipewire.defaultAudioSink property PwNode source: Pipewire.defaultAudioSource + readonly property real hardMaxValue: 2.00 // People keep joking about setting volume to 5172% so... signal sinkProtectionTriggered(string reason); @@ -39,7 +40,7 @@ Singleton { if (newVolume - lastVolume > maxAllowedIncrease) { sink.audio.volume = lastVolume; root.sinkProtectionTriggered("Illegal increment"); - } else if (newVolume > maxAllowed) { + } else if (newVolume > maxAllowed || newVolume > root.hardMaxValue) { root.sinkProtectionTriggered("Exceeded max allowed"); sink.audio.volume = Math.min(lastVolume, maxAllowed); } From 4258d94d003091a7243819b0233e6cb55239186f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 00:22:16 +0200 Subject: [PATCH 102/125] media controls: fix cover wrong after switching track, make not rely on cascade --- .../modules/mediaControls/MediaControls.qml | 2 - .../modules/mediaControls/PlayerControl.qml | 88 ++++++++++--------- 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/.config/quickshell/ii/modules/mediaControls/MediaControls.qml b/.config/quickshell/ii/modules/mediaControls/MediaControls.qml index 5f8154a76..ea90be154 100644 --- a/.config/quickshell/ii/modules/mediaControls/MediaControls.qml +++ b/.config/quickshell/ii/modules/mediaControls/MediaControls.qml @@ -21,9 +21,7 @@ Scope { readonly property real osdWidth: Appearance.sizes.osdWidth readonly property real widgetWidth: Appearance.sizes.mediaControlsWidth readonly property real widgetHeight: Appearance.sizes.mediaControlsHeight - property real contentPadding: 13 property real popupRounding: Appearance.rounding.screenRounding - Appearance.sizes.elevationMargin + 1 - property real artRounding: Appearance.rounding.verysmall property list visualizerPoints: [] property bool hasPlasmaIntegration: false diff --git a/.config/quickshell/ii/modules/mediaControls/PlayerControl.qml b/.config/quickshell/ii/modules/mediaControls/PlayerControl.qml index 0e318e0f3..cc248151f 100644 --- a/.config/quickshell/ii/modules/mediaControls/PlayerControl.qml +++ b/.config/quickshell/ii/modules/mediaControls/PlayerControl.qml @@ -13,11 +13,11 @@ import Quickshell.Io import Quickshell.Services.Mpris Item { // Player instance - id: playerController + id: root required property MprisPlayer player property var artUrl: player?.trackArtUrl property string artDownloadLocation: Directories.coverArt - property string artFileName: Qt.md5(artUrl) + ".jpg" + property string artFileName: Qt.md5(artUrl) property string artFilePath: `${artDownloadLocation}/${artFileName}` property color artDominantColor: ColorUtils.mix((colorQuantizer?.colors[0] ?? Appearance.colors.colPrimary), Appearance.colors.colPrimaryContainer, 0.8) || Appearance.m3colors.m3secondaryContainer property bool downloaded: false @@ -26,6 +26,8 @@ Item { // Player instance property int visualizerSmoothing: 2 // Number of points to average for smoothing property real radius + property string displayedArtFilePath: root.downloaded ? Qt.resolvedUrl(artFilePath) : "" + component TrackChangeButton: RippleButton { implicitWidth: 24 implicitHeight: 24 @@ -49,37 +51,41 @@ Item { // Player instance } Timer { // Force update for revision - running: playerController.player?.playbackState == MprisPlaybackState.Playing + running: root.player?.playbackState == MprisPlaybackState.Playing interval: Config.options.resources.updateInterval repeat: true onTriggered: { - playerController.player.positionChanged() + root.player.positionChanged() } } - onArtUrlChanged: { - if (playerController.artUrl.length == 0) { - playerController.artDominantColor = Appearance.m3colors.m3secondaryContainer + onArtFilePathChanged: { + if (root.artUrl.length == 0) { + root.artDominantColor = Appearance.m3colors.m3secondaryContainer return; } - // console.log("PlayerControl: Art URL changed to", playerController.artUrl) - // console.log("Download cmd:", coverArtDownloader.command.join(" ")) - playerController.downloaded = false + + // Binding does not work in Process + coverArtDownloader.targetFile = root.artUrl + coverArtDownloader.artFilePath = root.artFilePath + // Download + root.downloaded = false coverArtDownloader.running = true } Process { // Cover art downloader id: coverArtDownloader - property string targetFile: playerController.artUrl + property string targetFile: root.artUrl + property string artFilePath: root.artFilePath command: [ "bash", "-c", `[ -f ${artFilePath} ] || curl -sSL '${targetFile}' -o '${artFilePath}'` ] onExited: (exitCode, exitStatus) => { - playerController.downloaded = true + root.downloaded = true } } ColorQuantizer { id: colorQuantizer - source: playerController.downloaded ? Qt.resolvedUrl(artFilePath) : "" + source: root.displayedArtFilePath depth: 0 // 2^0 = 1 color rescaleSize: 1 // Rescale to 1x1 pixel for faster processing } @@ -96,7 +102,7 @@ Item { // Player instance anchors.fill: parent anchors.margins: Appearance.sizes.elevationMargin color: blendedColors.colLayer0 - radius: playerController.radius + radius: root.radius layer.enabled: true layer.effect: OpacityMask { @@ -110,7 +116,7 @@ Item { // Player instance Image { id: blurredArt anchors.fill: parent - source: playerController.downloaded ? Qt.resolvedUrl(artFilePath) : "" + source: root.displayedArtFilePath sourceSize.width: background.width sourceSize.height: background.height fillMode: Image.PreserveAspectCrop @@ -126,30 +132,30 @@ Item { // Player instance Rectangle { anchors.fill: parent color: ColorUtils.transparentize(blendedColors.colLayer0, 0.3) - radius: playerController.radius + radius: root.radius } } WaveVisualizer { id: visualizerCanvas anchors.fill: parent - live: playerController.player?.isPlaying - points: playerController.visualizerPoints - maxVisualizerValue: playerController.maxVisualizerValue - smoothing: playerController.visualizerSmoothing + live: root.player?.isPlaying + points: root.visualizerPoints + maxVisualizerValue: root.maxVisualizerValue + smoothing: root.visualizerSmoothing color: blendedColors.colPrimary } RowLayout { anchors.fill: parent - anchors.margins: root.contentPadding + anchors.margins: 13 spacing: 15 Rectangle { // Art background id: artBackground Layout.fillHeight: true implicitWidth: height - radius: root.artRounding + radius: Appearance.rounding.verysmall color: ColorUtils.transparentize(blendedColors.colLayer1, 0.5) layer.enabled: true @@ -166,7 +172,7 @@ Item { // Player instance property int size: parent.height anchors.fill: parent - source: playerController.downloaded ? Qt.resolvedUrl(artFilePath) : "" + source: root.displayedArtFilePath fillMode: Image.PreserveAspectCrop cache: false antialiasing: true @@ -188,7 +194,7 @@ Item { // Player instance font.pixelSize: Appearance.font.pixelSize.large color: blendedColors.colOnLayer0 elide: Text.ElideRight - text: StringUtils.cleanMusicTitle(playerController.player?.trackTitle) || "Untitled" + text: StringUtils.cleanMusicTitle(root.player?.trackTitle) || "Untitled" animateChange: true animationDistanceX: 6 animationDistanceY: 0 @@ -199,7 +205,7 @@ Item { // Player instance font.pixelSize: Appearance.font.pixelSize.smaller color: blendedColors.colSubtext elide: Text.ElideRight - text: playerController.player?.trackArtist + text: root.player?.trackArtist animateChange: true animationDistanceX: 6 animationDistanceY: 0 @@ -217,7 +223,7 @@ Item { // Player instance font.pixelSize: Appearance.font.pixelSize.small color: blendedColors.colSubtext elide: Text.ElideRight - text: `${StringUtils.friendlyTimeForSeconds(playerController.player?.position)} / ${StringUtils.friendlyTimeForSeconds(playerController.player?.length)}` + text: `${StringUtils.friendlyTimeForSeconds(root.player?.position)} / ${StringUtils.friendlyTimeForSeconds(root.player?.length)}` } RowLayout { id: sliderRow @@ -228,7 +234,7 @@ Item { // Player instance } TrackChangeButton { iconName: "skip_previous" - onClicked: playerController.player?.previous() + onClicked: root.player?.previous() } Item { id: progressBarContainer @@ -238,15 +244,15 @@ Item { // Player instance Loader { id: sliderLoader anchors.fill: parent - active: playerController.player?.canSeek ?? false + active: root.player?.canSeek ?? false sourceComponent: StyledSlider { configuration: StyledSlider.Configuration.Wavy highlightColor: blendedColors.colPrimary trackColor: blendedColors.colSecondaryContainer handleColor: blendedColors.colPrimary - value: playerController.player?.position / playerController.player?.length + value: root.player?.position / root.player?.length onMoved: { - playerController.player.position = value * playerController.player.length; + root.player.position = value * root.player.length; } } } @@ -258,12 +264,12 @@ Item { // Player instance left: parent.left right: parent.right } - active: !(playerController.player?.canSeek ?? false) + active: !(root.player?.canSeek ?? false) sourceComponent: StyledProgressBar { - wavy: playerController.player?.isPlaying + wavy: root.player?.isPlaying highlightColor: blendedColors.colPrimary trackColor: blendedColors.colSecondaryContainer - value: playerController.player?.position / playerController.player?.length + value: root.player?.position / root.player?.length } } @@ -271,7 +277,7 @@ Item { // Player instance } TrackChangeButton { iconName: "skip_next" - onClicked: playerController.player?.next() + onClicked: root.player?.next() } } @@ -283,19 +289,19 @@ Item { // Player instance property real size: 44 implicitWidth: size implicitHeight: size - onClicked: playerController.player.togglePlaying(); + onClicked: root.player.togglePlaying(); - buttonRadius: playerController.player?.isPlaying ? Appearance?.rounding.normal : size / 2 - colBackground: playerController.player?.isPlaying ? blendedColors.colPrimary : blendedColors.colSecondaryContainer - colBackgroundHover: playerController.player?.isPlaying ? blendedColors.colPrimaryHover : blendedColors.colSecondaryContainerHover - colRipple: playerController.player?.isPlaying ? blendedColors.colPrimaryActive : blendedColors.colSecondaryContainerActive + buttonRadius: root.player?.isPlaying ? Appearance?.rounding.normal : size / 2 + colBackground: root.player?.isPlaying ? blendedColors.colPrimary : blendedColors.colSecondaryContainer + colBackgroundHover: root.player?.isPlaying ? blendedColors.colPrimaryHover : blendedColors.colSecondaryContainerHover + colRipple: root.player?.isPlaying ? blendedColors.colPrimaryActive : blendedColors.colSecondaryContainerActive contentItem: MaterialSymbol { iconSize: Appearance.font.pixelSize.huge fill: 1 horizontalAlignment: Text.AlignHCenter - color: playerController.player?.isPlaying ? blendedColors.colOnPrimary : blendedColors.colOnSecondaryContainer - text: playerController.player?.isPlaying ? "pause" : "play_arrow" + color: root.player?.isPlaying ? blendedColors.colOnPrimary : blendedColors.colOnSecondaryContainer + text: root.player?.isPlaying ? "pause" : "play_arrow" Behavior on color { animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) From 53717588f9f91fb9ce79cd30a232db7c8c01aee2 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 00:27:51 +0200 Subject: [PATCH 103/125] screen corner interaction: make not unnecessarily enabled --- .config/quickshell/ii/modules/screenCorners/ScreenCorners.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml b/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml index cc5734ab8..981ba556b 100644 --- a/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml +++ b/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml @@ -29,7 +29,7 @@ Scope { exclusionMode: ExclusionMode.Ignore mask: Region { - item: sidebarCornerOpenInteractionLoader.active ? sidebarCornerOpenInteractionLoader : null + item: (sidebarCornerOpenInteractionLoader.active && Config.options.sidebar.cornerOpen.bottom != Config.options.bar.bottom) ? sidebarCornerOpenInteractionLoader : null } WlrLayershell.namespace: "quickshell:screenCorners" WlrLayershell.layer: WlrLayer.Overlay From bccb51622368782326cef55c0146633528681cb2 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 00:37:50 +0200 Subject: [PATCH 104/125] screen corner interaction: fix not working for vertical bar --- .../ii/modules/screenCorners/ScreenCorners.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml b/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml index 981ba556b..eb5768875 100644 --- a/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml +++ b/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml @@ -29,7 +29,7 @@ Scope { exclusionMode: ExclusionMode.Ignore mask: Region { - item: (sidebarCornerOpenInteractionLoader.active && Config.options.sidebar.cornerOpen.bottom != Config.options.bar.bottom) ? sidebarCornerOpenInteractionLoader : null + item: sidebarCornerOpenInteractionLoader.active ? sidebarCornerOpenInteractionLoader : null } WlrLayershell.namespace: "quickshell:screenCorners" WlrLayershell.layer: WlrLayer.Overlay @@ -62,7 +62,12 @@ Scope { Loader { id: sidebarCornerOpenInteractionLoader - active: (!cornerPanelWindow.fullscreen && Config.options.sidebar.cornerOpen.enable && (Config.options.sidebar.cornerOpen.bottom == cornerWidget.isBottom)) + active: { + if (!Config.options.sidebar.cornerOpen.enable) return false; + if (!Config.options.bar.vertical && Config.options.sidebar.cornerOpen.bottom == Config.options.bar.bottom) return false; + if (cornerPanelWindow.fullscreen) return false; + return (Config.options.sidebar.cornerOpen.bottom == cornerWidget.isBottom); + } anchors { top: (cornerWidget.isTopLeft || cornerWidget.isTopRight) ? parent.top : undefined bottom: (cornerWidget.isBottomLeft || cornerWidget.isBottomRight) ? parent.bottom : undefined From 856cfd3ebbcda7d49823d9988494363329f86270 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 09:20:42 +0200 Subject: [PATCH 105/125] hourhand: parameterize hand length --- .../ii/modules/background/cookieClock/CookieClock.qml | 1 + .../ii/modules/background/cookieClock/DateIndicator.qml | 2 -- .../ii/modules/background/cookieClock/HourHand.qml | 7 ++----- .../ii/modules/background/cookieClock/HourMarks.qml | 1 - .../ii/modules/background/cookieClock/MinuteHand.qml | 4 ---- .../ii/modules/background/cookieClock/MinuteMarks.qml | 3 --- .../ii/modules/background/cookieClock/SecondHand.qml | 4 ---- 7 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index db5da0210..38d479455 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -96,6 +96,7 @@ Item { // Hour hand HourHand { anchors.fill: parent + handLength: root.hourHandLength handWidth: root.hourHandWidth clockHour: root.clockHour clockMinute: root.clockMinute diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index f9824bae3..7454183e8 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -1,10 +1,8 @@ pragma ComponentBehavior: Bound -import qs import qs.services import qs.modules.common import qs.modules.common.widgets -import qs.modules.common.functions import QtQuick Item { diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml index 01e6bae21..97fa61036 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -1,10 +1,6 @@ pragma ComponentBehavior: Bound -import qs -import qs.services import qs.modules.common -import qs.modules.common.widgets -import qs.modules.common.functions import QtQuick Item { @@ -13,6 +9,7 @@ Item { required property int clockHour required property int clockMinute + property real handLength: 72 property real handWidth: 16 property string style: "fill" property color color: Appearance.colors.colPrimary @@ -38,7 +35,7 @@ Item { if (root.style === "classic") position -= 15; return position; } - width: hourHandLength + width: root.handLength height: root.style === "classic" ? 8 : root.handWidth radius: root.style === "classic" ? 2 : root.handWidth / 2 diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml index 2f4304845..31d7280e8 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml @@ -1,6 +1,5 @@ pragma ComponentBehavior: Bound -import qs import qs.services import qs.modules.common import qs.modules.common.widgets diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml index 218f4c72a..c4db1765b 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml @@ -1,10 +1,6 @@ pragma ComponentBehavior: Bound -import qs -import qs.services import qs.modules.common -import qs.modules.common.widgets -import qs.modules.common.functions import QtQuick Item { diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml index 6ac1a3e0d..68629aa70 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml @@ -1,10 +1,7 @@ pragma ComponentBehavior: Bound -import qs -import qs.services import qs.modules.common import qs.modules.common.widgets -import qs.modules.common.functions import QtQuick Item { diff --git a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml index 0ce587850..e9151370c 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml @@ -1,10 +1,6 @@ pragma ComponentBehavior: Bound -import qs -import qs.services import qs.modules.common -import qs.modules.common.widgets -import qs.modules.common.functions import QtQuick Item { From 22108934ff86bb4a921ed09d1f33c5cbf3fe3597 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 09:27:28 +0200 Subject: [PATCH 106/125] remove redundant DateIndicator --- .../background/cookieClock/DateIndicator.qml | 186 ------------------ 1 file changed, 186 deletions(-) delete mode 100644 .config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml deleted file mode 100644 index 7454183e8..000000000 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ /dev/null @@ -1,186 +0,0 @@ -pragma ComponentBehavior: Bound - -import qs.services -import qs.modules.common -import qs.modules.common.widgets -import QtQuick - -Item { - id: root - property string style: "rotating" - property color colOnBackground: Appearance.colors.colOnSecondaryContainer - property color colBackground: Appearance.colors.colOnSecondaryContainer - property real dateSquareSize: 64 - - Loader { - anchors.fill: parent - opacity: root.style === "rotating" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - - active: opacity > 0 - sourceComponent: Canvas { - z: 0 - rotation: { - if (!Config.options.time.secondPrecision) - return 0; - return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center - } - - onPaint: { - var ctx = getContext("2d"); - ctx.clearRect(0, 0, width, height); - ctx.font = "700 30px " + Appearance.font.family.title; - - var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); - var radius = 78; - var angleStep = Math.PI / 2.35 / text.length; - - for (var i = 0; i < text.length; i++) { - var angle = i * angleStep - Math.PI / 2; - var x = width / 2 + radius * Math.cos(angle); - var y = height / 2 + radius * Math.sin(angle); - - ctx.save(); - ctx.translate(x, y); - ctx.rotate(angle + Math.PI / 2); - - if (i >= 3) - ctx.fillStyle = root.colOnBackground; - else - ctx.fillStyle = Appearance.colors.colSecondaryHover; - - ctx.fillText(text[i], 0, 0); - ctx.restore(); - } - } - } - } - - // Square date (only today's number) in right side of the clock - Loader { - anchors { - verticalCenter: parent.verticalCenter - right: parent.right - rightMargin: 10 - } - width: root.style === "rect" ? 45 : 0 - height: root.style === "rect" ? 30 : 0 - Behavior on width { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on height { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - active: height > 0 - sourceComponent: Rectangle { - z: 1 - color: root.colBackground - radius: Appearance.rounding.small - StyledText { - opacity: root.style === "rect" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - anchors.centerIn: parent - color: Appearance.colors.colSecondaryHover - text: DateTime.date.substring(5, 7) - font { - family: Appearance.font.family.expressive - pixelSize: 20 - weight: 1000 - } - } - } - } - - // Date bubble style left side - Loader { - anchors { - left: parent.left - bottom: parent.bottom - topMargin: 50 - } - property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 - width: targetSize - height: targetSize - Behavior on targetSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - active: targetSize > 0 - sourceComponent: Item { - MaterialCookie { - z: 5 - sides: 4 - anchors.centerIn: parent - color: Appearance.colors.colPrimaryContainer - implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 - constantlyRotate: Config.options.background.clock.cookie.constantlyRotate - Behavior on implicitSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } - StyledText { - z: 6 - anchors.centerIn: parent - text: DateTime.date.substring(5, 7) - color: Appearance.colors.colPrimary - opacity: root.style === "bubble" ? 1.0 : 0 - font { - family: Appearance.font.family.expressive - pixelSize: 30 - weight: 1000 - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } - - // Date bubble style right side - Loader { - anchors { - right: parent.right - top: parent.top - bottomMargin: 50 - } - property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 - width: targetSize - height: targetSize - Behavior on targetSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - - active: targetSize > 0 - sourceComponent: Item { - MaterialCookie { - z: 5 - sides: 1 - anchors.centerIn: parent - color: Appearance.colors.colTertiaryContainer - implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 - constantlyRotate: Config.options.background.clock.cookie.constantlyRotate - Behavior on implicitSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } - StyledText { - z: 6 - anchors.centerIn: parent - text: DateTime.date.substring(8, 10) - color: Appearance.colors.colTertiary - opacity: root.style === "bubble" ? 1.0 : 0 - font { - family: Appearance.font.family.expressive - pixelSize: 30 - weight: 1000 - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } -} From a9b60c1d1b873db7f4f7256534b5b09cd6d2dbd7 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 09:42:22 +0200 Subject: [PATCH 107/125] adjust quote style --- .../modules/background/cookieClock/CookieQuote.qml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml index 39afa2004..9e049a657 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml @@ -3,7 +3,6 @@ import qs.services import qs.modules.common import qs.modules.common.widgets import QtQuick -import QtQuick.Layouts import Qt5Compat.GraphicalEffects @@ -36,25 +35,25 @@ Item { implicitHeight: quoteStyledText.height + 8 radius: Appearance.rounding.small color: Appearance.colors.colSecondaryContainer - RowLayout { + + Row { anchors.centerIn: parent spacing: 4 MaterialSymbol { id: quoteIcon + anchors.top: parent.top iconSize: Appearance.font.pixelSize.huge - text: "comic_bubble" + text: "format_quote" color: Appearance.colors.colOnSecondaryContainer } StyledText { id: quoteStyledText - Layout.fillWidth: true - horizontalAlignment: Text.AlignHCenter + horizontalAlignment: Text.AlignLeft text: Config.options.background.quote font { - family: Appearance.font.family.main + family: Appearance.font.family.reading pixelSize: Appearance.font.pixelSize.large weight: Font.Normal - italic: true } } } From c519505296bd9c02348ca21f7fccaba103d87d8c Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 10:46:36 +0200 Subject: [PATCH 108/125] refractor MinuteMarks --- .../background/cookieClock/CookieClock.qml | 7 +- .../background/cookieClock/MinuteMarks.qml | 145 ------------------ .../minuteMarks/BigHourNumbers.qml | 49 ++++++ .../cookieClock/minuteMarks/Dots.qml | 34 ++++ .../cookieClock/minuteMarks/Lines.qml | 66 ++++++++ .../cookieClock/minuteMarks/MinuteMarks.qml | 50 ++++++ .../ii/modules/common/widgets/FadeLoader.qml | 16 ++ 7 files changed, 218 insertions(+), 149 deletions(-) delete mode 100644 .config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/minuteMarks/BigHourNumbers.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/minuteMarks/Dots.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/minuteMarks/Lines.qml create mode 100644 .config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml create mode 100644 .config/quickshell/ii/modules/common/widgets/FadeLoader.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 95f2763d7..f376576c3 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -10,6 +10,7 @@ import QtQuick.Layouts import Qt5Compat.GraphicalEffects import "./dateIndicators" +import "./minuteMarks" Item { id: root @@ -74,10 +75,8 @@ Item { // Hour/minutes numbers/dots/lines MinuteMarks { anchors.fill: parent - property int hourDotSize: root.hourDotSize - property int hourNumberSize: root.hourNumberSize - property int hourLineSize: root.hourLineSize - property int minuteLineSize: root.minuteLineSize + hourDotSize: root.hourDotSize + hourNumberSize: root.hourNumberSize color: root.colOnBackground } HourMarks { diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml deleted file mode 100644 index be831235b..000000000 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml +++ /dev/null @@ -1,145 +0,0 @@ -pragma ComponentBehavior: Bound - -import qs.modules.common -import qs.modules.common.widgets -import QtQuick - -Item { - id: root - - property int hourDotSize: 16 - property int hourNumberSize: 80 - property int hourLineSize: 8 - property int minuteLineSize: 4 - property color color: Appearance.colors.colOnSecondaryContainer - property string style: Config.options.background.clock.cookie.dialNumberStyle // "dots", "numbers", "full", "hide" - property string dateStyle : Config.options.background.clock.cookie.dateStyle - - Repeater { - model: 12 - Item { - required property int index - opacity: root.style === "dots" ? 1.0 : 0 - rotation: 360 / 12 * index - anchors.fill: parent - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: root.style === "dots" ? 10 : 50 - } - Behavior on anchors.leftMargin { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - implicitWidth: root.hourDotSize - implicitHeight: implicitWidth - radius: implicitWidth / 2 - color: root.color - opacity: 0.5 - } - } - } - - // Hour Indicator numbers (3-6-9-12) - Repeater { - model: 4 - Item { - id: numberItem - required property int index - opacity: root.style === "numbers" ? 1.0 : 0 - rotation: 360 / 4 * index - anchors.fill: parent - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - color: "transparent" - implicitWidth: root.hourNumberSize - implicitHeight: implicitWidth - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: root.style === "numbers" ? root.dateStyle === "rotating" ? 48 : 32 : 96 - } - Behavior on anchors.leftMargin { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - StyledText { - color: root.color - anchors.centerIn: parent - text: numberItem.index === 0 ? "9" : - numberItem.index === 1 ? "12" : - numberItem.index === 2 ? "3" : "6" - rotation: numberItem.index % 2 === 0 ? numberItem.index * 90 : -numberItem.index * 90 //A better way can be found to show texts on right angle - font { - family: Appearance.font.family.reading - pixelSize: root.dateStyle === "rotating" ? 70 : 80 - weight: 1000 - } - Behavior on font.pixelSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } - } - } - } - - // Full dial style hour lines - Repeater { - model: 12 - Item { - required property int index - rotation: 360 / 12 * index - anchors.fill: parent - opacity: root.style === "full" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - implicitWidth: root.hourLineSize * 3.5 - implicitHeight: root.hourLineSize - radius: implicitWidth / 2 - color: root.color - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: root.style === "full" ? 10 : 50 - } - Behavior on anchors.leftMargin { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } - // Full dial style minute lines - Repeater { - model: 60 - Item { - required property int index - rotation: 360 / 60 * index - anchors.fill: parent - opacity: root.style === "full" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Rectangle { - implicitWidth: root.minuteLineSize * 3.5 - implicitHeight: root.minuteLineSize - radius: implicitWidth / 2 - color: root.color - opacity: 0.5 - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: root.style === "full" ? 10 : 50 - } - Behavior on anchors.leftMargin { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - } - } - } -} diff --git a/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/BigHourNumbers.qml b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/BigHourNumbers.qml new file mode 100644 index 000000000..d0794d1e4 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/BigHourNumbers.qml @@ -0,0 +1,49 @@ +pragma ComponentBehavior: Bound + +import qs.modules.common +import qs.modules.common.widgets +import QtQuick + +Item { + id: root + property real numberSize: 80 + property real margins: 10 + property color color: Appearance.colors.colOnSecondaryContainer + + property int hours: 12 + property int numbers: 4 + property int fontSize: 80 + + Repeater { + model: root.numbers + + Item { + id: numberItem + required property int index + rotation: 360 / root.numbers * (index + 1) + anchors.fill: parent + + Item { + implicitWidth: root.numberSize + implicitHeight: implicitWidth + anchors { + top: parent.top + horizontalCenter: parent.horizontalCenter + topMargin: root.margins + } + StyledText { + color: root.color + anchors.centerIn: parent + text: root.hours / root.numbers * (numberItem.index + 1) + rotation: -numberItem.rotation + + font { + family: Appearance.font.family.reading + pixelSize: root.fontSize + weight: Font.Black + } + } + } + } + } +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/Dots.qml b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/Dots.qml new file mode 100644 index 000000000..60bf59474 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/Dots.qml @@ -0,0 +1,34 @@ +pragma ComponentBehavior: Bound + +import qs.modules.common +import qs.modules.common.widgets +import QtQuick + +Item { + id: root + property real implicitSize: 12 + property real margins: 10 + property color color: Appearance.colors.colOnSecondaryContainer + + Repeater { + model: 12 + + Item { + required property int index + anchors.fill: parent // Ensures rotation works properly + rotation: 360 / 12 * index + + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: root.margins + } + implicitWidth: root.implicitSize + implicitHeight: implicitWidth + radius: implicitWidth / 2 + color: root.color + } + } + } +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/Lines.qml b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/Lines.qml new file mode 100644 index 000000000..c4b8d721f --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/Lines.qml @@ -0,0 +1,66 @@ +pragma ComponentBehavior: Bound + +import qs.modules.common +import qs.modules.common.widgets +import QtQuick + +Item { + id: root + property real numberSize: 80 + property real margins: 10 + property color color: Appearance.colors.colOnSecondaryContainer + + property real hourLineSize: 4 + property real minuteLineSize: 2 + property real hourLineLength: 18 + property real minuteLineLength: 7 + + property int hours: 12 + property int minutes: 60 + + // Full dial style hour lines + Repeater { + model: root.hours + + Item { + required property int index + rotation: 360 / root.hours * index + anchors.fill: parent + + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: root.margins + } + implicitWidth: root.hourLineLength + implicitHeight: root.hourLineSize + radius: implicitWidth / 2 + color: root.color + } + } + } + + // Minute lines + Repeater { + model: root.minutes + + Item { + required property int index + rotation: 360 / root.minutes * index + anchors.fill: parent + + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: root.margins + } + implicitWidth: root.minuteLineLength + implicitHeight: root.minuteLineSize + radius: implicitWidth / 2 + color: root.color + } + } + } +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml new file mode 100644 index 000000000..a1f28c7bb --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml @@ -0,0 +1,50 @@ +pragma ComponentBehavior: Bound + +import qs.modules.common +import qs.modules.common.widgets +import QtQuick + +Item { + id: root + + property int hourDotSize: 16 + property int hourNumberSize: 80 + property color color: Appearance.colors.colOnSecondaryContainer + property string style: Config.options.background.clock.cookie.dialNumberStyle // "dots", "numbers", "full", "hide" + property string dateStyle : Config.options.background.clock.cookie.dateStyle + + // 12 Dots + FadeLoader { + id: dotsLoader + anchors.fill: parent + shown: root.style === "dots" + sourceComponent: Dots { + color: root.color + margins: 46 - dotsLoader.opacity * 34 + } + } + + // 3-6-9-12 hour numbers (pls don't realize you can have more than 4 numbers) + FadeLoader { + id: bigHourNumbersLoader + anchors.fill: parent + shown: root.style === "numbers" + sourceComponent: BigHourNumbers { + numberSize: root.hourNumberSize + color: root.color + margins: 70 - bigHourNumbersLoader.opacity * 40 + } + } + + // Lines + FadeLoader { + id: linesLoader + anchors.fill: parent + shown: root.style === "full" + sourceComponent: Lines { + color: root.color + margins: 46 - linesLoader.opacity * 34 + } + } + +} diff --git a/.config/quickshell/ii/modules/common/widgets/FadeLoader.qml b/.config/quickshell/ii/modules/common/widgets/FadeLoader.qml new file mode 100644 index 000000000..aaa2753f8 --- /dev/null +++ b/.config/quickshell/ii/modules/common/widgets/FadeLoader.qml @@ -0,0 +1,16 @@ +import QtQuick + +import qs.modules.common +import qs.modules.common.widgets + +Loader { + id: root + property bool shown: true + opacity: shown ? 1 : 0 + visible: opacity > 0 + active: opacity > 0 + + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } +} From 7ae53ac3641fbc71239d2cc05a120cad01e55f7e Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 10:55:35 +0200 Subject: [PATCH 109/125] rename dateIndicator folder --- .../ii/modules/background/cookieClock/CookieClock.qml | 3 ++- .../{dateIndicators => dateIndicator}/BubbleDate.qml | 0 .../{dateIndicators => dateIndicator}/DateIndicator.qml | 0 .../{dateIndicators => dateIndicator}/RectangleDate.qml | 0 .../{dateIndicators => dateIndicator}/RotatingDate.qml | 2 +- 5 files changed, 3 insertions(+), 2 deletions(-) rename .config/quickshell/ii/modules/background/cookieClock/{dateIndicators => dateIndicator}/BubbleDate.qml (100%) rename .config/quickshell/ii/modules/background/cookieClock/{dateIndicators => dateIndicator}/DateIndicator.qml (100%) rename .config/quickshell/ii/modules/background/cookieClock/{dateIndicators => dateIndicator}/RectangleDate.qml (100%) rename .config/quickshell/ii/modules/background/cookieClock/{dateIndicators => dateIndicator}/RotatingDate.qml (94%) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index f376576c3..f090a8d2b 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -9,7 +9,7 @@ import QtQuick import QtQuick.Layouts import Qt5Compat.GraphicalEffects -import "./dateIndicators" +import "./dateIndicator" import "./minuteMarks" Item { @@ -79,6 +79,7 @@ Item { hourNumberSize: root.hourNumberSize color: root.colOnBackground } + HourMarks { anchors.centerIn: parent implicitSize: root.hourMarkSize diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml similarity index 100% rename from .config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml rename to .config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml similarity index 100% rename from .config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml rename to .config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RectangleDate.qml similarity index 100% rename from .config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml rename to .config/quickshell/ii/modules/background/cookieClock/dateIndicator/RectangleDate.qml diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml similarity index 94% rename from .config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml rename to .config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml index dc381d332..34fbef94e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml @@ -13,7 +13,7 @@ Item { readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle readonly property bool timeIndicators: Config.options.background.clock.cookie.timeIndicators - property real radius: style === "rotating" ? dialStyle === "numbers" || timeIndicators ? 90 : 75 : 0 + property real radius: style === "rotating" ? 90 : 0 Behavior on radius { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } From 8e7b012c4c3081ef6e44aa24eec877516f779248 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 11:18:32 +0200 Subject: [PATCH 110/125] fix am pm matching --- .../quickshell/ii/modules/background/cookieClock/TimeColumn.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml index bdab277e5..c9fd3b4e0 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml @@ -22,7 +22,7 @@ Column { delegate: StyledText { required property string modelData property bool hourMarksEnabled: Config.options.background.clock.cookie.hourMarks - property bool isAmPm: !!modelData.match(/am|pm/i) + property bool isAmPm: !modelData.match(/\d{2}/i) property real numberSizeWithoutGlow: isAmPm ? 26 : 68 property real numberSizeWithGlow: isAmPm ? 10 : 40 property real numberSize: root.isEnabled ? (hourMarksEnabled ? numberSizeWithGlow : numberSizeWithoutGlow) : 100 // open/close animation From 61fec4b53d9318a21d5ed2df92c354bde325d4a1 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 11:20:15 +0200 Subject: [PATCH 111/125] background clock: hour marks: put in loader, reduce behavior spam --- .../background/cookieClock/CookieClock.qml | 17 +++--- .../background/cookieClock/HourMarks.qml | 52 +++++-------------- .../cookieClock/minuteMarks/MinuteMarks.qml | 4 +- 3 files changed, 22 insertions(+), 51 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index f090a8d2b..22bc6005b 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -29,7 +29,7 @@ Item { property real secondDotSize: 20 property real secondHandWidth: 2 property real secondHandLength: 100 - property real hourLineSize: 5 + property real hourLineSize: 4 property real minuteLineSize: 2 property real hourNumberSize: 36 property real dateSquareSize: 64 @@ -75,17 +75,18 @@ Item { // Hour/minutes numbers/dots/lines MinuteMarks { anchors.fill: parent - hourDotSize: root.hourDotSize - hourNumberSize: root.hourNumberSize color: root.colOnBackground } - HourMarks { + FadeLoader { + id: hourMarksLoader anchors.centerIn: parent - implicitSize: root.hourMarkSize - markLength: root.hourDotSize - color: root.colTimeIndicators - colOnBackground: root.colOnBackground + shown: Config.options.background.clock.cookie.hourMarks + sourceComponent: HourMarks { + implicitSize: root.hourMarkSize * (1.75 - 0.75 * hourMarksLoader.opacity) + color: root.colTimeIndicators + colOnBackground: root.colOnBackground + } } // Number column in the middle diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml index 31d7280e8..c20b14a60 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml @@ -9,70 +9,42 @@ import QtQuick Item { id: root property real implicitSize: 135 - property real markLength: 10 + property real markLength: 12 + property real markWidth: 4 property color color: Appearance.colors.colOnSecondaryContainer property color colOnBackground: Appearance.colors.colSecondaryContainer - - property bool isEnabled: Config.options.background.clock.cookie.hourMarks + property real padding: 10 Rectangle { - opacity: root.isEnabled ? 1.0 : 0 - z: 0 color: root.color anchors.centerIn: parent - implicitWidth: root.isEnabled ? root.implicitSize : root.implicitSize * 1.75 - implicitHeight: root.isEnabled ? root.implicitSize : root.implicitSize * 1.75 // Not using implicitHeight to allow smooth transition - radius: implicitWidth / 2 - Behavior on opacity { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitWidth { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitHeight { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - } + implicitWidth: root.implicitSize + implicitHeight: root.implicitSize + radius: width / 2 - // Hour mark lines - Rectangle { - id: glowLines - z: 1 - anchors.centerIn: parent + // Hour mark lines Repeater { model: 12 + Item { required property int index anchors.fill: parent - rotation: 360 / 12 * index - opacity: root.isEnabled ? 1.0 : 0 - - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } Rectangle { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: root.isEnabled ? 50 : 75 + leftMargin: root.padding } implicitWidth: root.markLength - implicitHeight: implicitWidth / 2 + implicitHeight: root.markWidth - radius: implicitWidth / 2 + radius: width / 2 color: root.colOnBackground - opacity: root.isEnabled ? 0.5 : 0 - - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Behavior on anchors.leftMargin { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } } } } } + } diff --git a/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml index a1f28c7bb..100e72284 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml @@ -7,8 +7,6 @@ import QtQuick Item { id: root - property int hourDotSize: 16 - property int hourNumberSize: 80 property color color: Appearance.colors.colOnSecondaryContainer property string style: Config.options.background.clock.cookie.dialNumberStyle // "dots", "numbers", "full", "hide" property string dateStyle : Config.options.background.clock.cookie.dateStyle @@ -30,7 +28,7 @@ Item { anchors.fill: parent shown: root.style === "numbers" sourceComponent: BigHourNumbers { - numberSize: root.hourNumberSize + numberSize: 80 color: root.color margins: 70 - bigHourNumbersLoader.opacity * 40 } From 872e0762b6b053736357ad0f1e019f846d21d222 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 11:22:55 +0200 Subject: [PATCH 112/125] time column: fix am pm spacing --- .../ii/modules/background/cookieClock/TimeColumn.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml index c9fd3b4e0..bea8194fe 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml @@ -6,8 +6,9 @@ import qs.modules.common import qs.modules.common.widgets import qs.modules.common.functions import QtQuick +import QtQuick.Layouts -Column { +ColumnLayout { id: root required property list clockNumbers property bool isEnabled: Config.options.background.clock.cookie.timeIndicators @@ -24,7 +25,7 @@ Column { property bool hourMarksEnabled: Config.options.background.clock.cookie.hourMarks property bool isAmPm: !modelData.match(/\d{2}/i) property real numberSizeWithoutGlow: isAmPm ? 26 : 68 - property real numberSizeWithGlow: isAmPm ? 10 : 40 + property real numberSizeWithGlow: isAmPm ? 20 : 40 property real numberSize: root.isEnabled ? (hourMarksEnabled ? numberSizeWithGlow : numberSizeWithoutGlow) : 100 // open/close animation anchors.horizontalCenter: root.horizontalCenter From 1e7e3a84c6f7a4a826ba04497ded1cd19aa87fbd Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 11:47:36 +0200 Subject: [PATCH 113/125] put time column in loader, use fewer `Behavior`s --- .../background/cookieClock/CookieClock.qml | 18 ++++++++++--- .../background/cookieClock/TimeColumn.qml | 25 +++++++------------ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 22bc6005b..067305017 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -77,7 +77,8 @@ Item { anchors.fill: parent color: root.colOnBackground } - + + // Stupid extra hour marks in the middle FadeLoader { id: hourMarksLoader anchors.centerIn: parent @@ -90,11 +91,20 @@ Item { } // Number column in the middle - TimeColumn { + FadeLoader { + id: timeColumnLoader anchors.centerIn: parent - color: root.colOnBackground - clockNumbers: root.clockNumbers + shown: Config.options.background.clock.cookie.timeIndicators + scale: 1.4 - 0.4 * timeColumnLoader.shown + Behavior on scale { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + + sourceComponent: TimeColumn { + color: root.colOnBackground + } } + // Hour hand HourHand { diff --git a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml index bea8194fe..fb7684010 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml @@ -10,11 +10,11 @@ import QtQuick.Layouts ColumnLayout { id: root - required property list clockNumbers + property list clockNumbers: DateTime.time.split(/[: ]/) property bool isEnabled: Config.options.background.clock.cookie.timeIndicators property color color: Appearance.colors.colOnSecondaryContainer - z: 0 + property bool hourMarksEnabled: Config.options.background.clock.cookie.hourMarks spacing: -16 Repeater { @@ -22,31 +22,24 @@ ColumnLayout { delegate: StyledText { required property string modelData - property bool hourMarksEnabled: Config.options.background.clock.cookie.hourMarks property bool isAmPm: !modelData.match(/\d{2}/i) property real numberSizeWithoutGlow: isAmPm ? 26 : 68 property real numberSizeWithGlow: isAmPm ? 20 : 40 - property real numberSize: root.isEnabled ? (hourMarksEnabled ? numberSizeWithGlow : numberSizeWithoutGlow) : 100 // open/close animation + property real numberSize: root.hourMarksEnabled ? numberSizeWithGlow : numberSizeWithoutGlow anchors.horizontalCenter: root.horizontalCenter - visible: opacity > 0 color: root.color - opacity: root.isEnabled ? 1.0 : 0 - - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - - text: modelData.padStart(2, "0") - font { family: Appearance.font.family.expressive weight: Font.Bold pixelSize: numberSize - Behavior on pixelSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } } + + Behavior on numberSize { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + + text: modelData.padStart(2, "0") } } } From 22316b46848db71849b3a3978beee4231ad35627 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 11:50:34 +0200 Subject: [PATCH 114/125] fix anchor in layout --- .../ii/modules/background/cookieClock/TimeColumn.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml index fb7684010..f667dc86f 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml @@ -6,9 +6,8 @@ import qs.modules.common import qs.modules.common.widgets import qs.modules.common.functions import QtQuick -import QtQuick.Layouts -ColumnLayout { +Column { id: root property list clockNumbers: DateTime.time.split(/[: ]/) property bool isEnabled: Config.options.background.clock.cookie.timeIndicators From 6c5cc980166044cf3707e03be5dd67101fe0591d Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 15:24:36 +0200 Subject: [PATCH 115/125] make volume protection message translatable (#2164) --- .config/quickshell/ii/services/Audio.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/services/Audio.qml b/.config/quickshell/ii/services/Audio.qml index f0c471910..43bc61b4d 100644 --- a/.config/quickshell/ii/services/Audio.qml +++ b/.config/quickshell/ii/services/Audio.qml @@ -39,9 +39,9 @@ Singleton { if (newVolume - lastVolume > maxAllowedIncrease) { sink.audio.volume = lastVolume; - root.sinkProtectionTriggered("Illegal increment"); + root.sinkProtectionTriggered(Translation.tr("Illegal increment")); } else if (newVolume > maxAllowed || newVolume > root.hardMaxValue) { - root.sinkProtectionTriggered("Exceeded max allowed"); + root.sinkProtectionTriggered(Translation.tr("Exceeded max allowed")); sink.audio.volume = Math.min(lastVolume, maxAllowed); } if (sink.ready && (isNaN(sink.audio.volume) || sink.audio.volume === undefined || sink.audio.volume === null)) { From 01bcab4af18a90748d8139514c882a4fb88dc883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Zanghelini?= Date: Sat, 11 Oct 2025 10:42:18 -0300 Subject: [PATCH 116/125] Allow keypad numbers for keybinds with numbers --- .config/hypr/hyprland/keybinds.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.config/hypr/hyprland/keybinds.conf b/.config/hypr/hyprland/keybinds.conf index 214707ae3..b23f18bdc 100644 --- a/.config/hypr/hyprland/keybinds.conf +++ b/.config/hypr/hyprland/keybinds.conf @@ -119,6 +119,17 @@ bind = Super+Alt, code:16, exec, ~/.config/hypr/hyprland/scripts/workspace_actio bind = Super+Alt, code:17, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 8 # [hidden] bind = Super+Alt, code:18, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 9 # [hidden] bind = Super+Alt, code:19, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 10 # [hidden] +# keypad numbers +bind = Super+Alt, code:87, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 1 # [hidden] +bind = Super+Alt, code:88, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 2 # [hidden] +bind = Super+Alt, code:89, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 3 # [hidden] +bind = Super+Alt, code:83, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 4 # [hidden] +bind = Super+Alt, code:84, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 5 # [hidden] +bind = Super+Alt, code:85, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 6 # [hidden] +bind = Super+Alt, code:79, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 7 # [hidden] +bind = Super+Alt, code:80, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 8 # [hidden] +bind = Super+Alt, code:81, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 9 # [hidden] +bind = Super+Alt, code:90, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 10 # [hidden] # #/# bind = Super+Shift, Scroll ↑/↓,, # Send to workspace left/right bind = Super+Shift, mouse_down, movetoworkspace, r-1 # [hidden] @@ -152,6 +163,17 @@ bind = Super, code:16, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh bind = Super, code:17, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 8 # [hidden] bind = Super, code:18, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 9 # [hidden] bind = Super, code:19, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 10 # [hidden] +# keypad numbers +bindp = Super, code:87, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 1 # [hidden] +bindp = Super, code:88, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 2 # [hidden] +bindp = Super, code:89, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 3 # [hidden] +bindp = Super, code:83, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 4 # [hidden] +bindp = Super, code:84, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 5 # [hidden] +bindp = Super, code:85, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 6 # [hidden] +bindp = Super, code:79, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 7 # [hidden] +bindp = Super, code:80, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 8 # [hidden] +bindp = Super, code:81, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 9 # [hidden] +bindp = Super, code:90, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 10 # [hidden] #/# bind = Ctrl+Super, ←/→,, # Focus left/right bind = Ctrl+Super, Right, workspace, r+1 # [hidden] From 407474118707f348fe0821c1a10124a14a6fe2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Zanghelini?= Date: Sat, 11 Oct 2025 10:49:41 -0300 Subject: [PATCH 117/125] Allow zoom with keypad --- .config/hypr/hyprland/keybinds.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/hypr/hyprland/keybinds.conf b/.config/hypr/hyprland/keybinds.conf index b23f18bdc..e2c9c0001 100644 --- a/.config/hypr/hyprland/keybinds.conf +++ b/.config/hypr/hyprland/keybinds.conf @@ -223,6 +223,11 @@ binde = Super, Minus, exec, qs -c $qsConfig ipc call zoom zoomOut # Zoom out binde = Super, Equal, exec, qs -c $qsConfig ipc call zoom zoomIn # Zoom in binde = Super, Minus, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # [hidden] Zoom out binde = Super, Equal, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # [hidden] Zoom in +# Zoom with keypad +binde = Super, code:82, exec, qs -c $qsConfig ipc call zoom zoomOut # Zoom out +binde = Super, code:86, exec, qs -c $qsConfig ipc call zoom zoomIn # Zoom in +binde = Super, code:82, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # [hidden] Zoom out +binde = Super, code:86, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # [hidden] Zoom in ##! Media bindl= Super+Shift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # Next track From 8e90c2898a4ea3d6987c348bc324df76ba431308 Mon Sep 17 00:00:00 2001 From: "Celestial.y" Date: Sat, 11 Oct 2025 22:23:02 +0800 Subject: [PATCH 118/125] Update post-installation link in install script --- scriptdata/step/3.install-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scriptdata/step/3.install-files.sh b/scriptdata/step/3.install-files.sh index 705f83bc6..548376060 100644 --- a/scriptdata/step/3.install-files.sh +++ b/scriptdata/step/3.install-files.sh @@ -172,7 +172,7 @@ printf "${STY_CYAN}Press ${STY_BG_CYAN} Ctrl+Super+T ${STY_BG_CYAN} to select a printf "${STY_CYAN}Press ${STY_BG_CYAN} Super+/ ${STY_CYAN} for a list of keybinds${STY_RESET}\n" printf "\n" printf "${STY_CYAN}For suggestions/hints after installation:${STY_RESET}\n" -printf "${STY_CYAN}${STY_UNDERLINE} https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/01setup/#post-installation ${STY_RESET}\n" +printf "${STY_CYAN}${STY_UNDERLINE} https://ii.clsty.link/en/ii-qs/01setup/#post-installation ${STY_RESET}\n" printf "\n" case $existed_hypr_conf_firstrun in From 410da66834f61f948d07d1e2a6f685405994e2e8 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:55:20 +0200 Subject: [PATCH 119/125] cookie clock: put hands in loaders --- .../background/cookieClock/CookieClock.qml | 77 ++++++++----------- .../background/cookieClock/HourHand.qml | 23 +----- .../background/cookieClock/MinuteHand.qml | 8 +- .../background/cookieClock/SecondHand.qml | 63 ++++++++------- .../cookieClock/minuteMarks/MinuteMarks.qml | 2 +- .../modules/common/widgets/MaterialCookie.qml | 2 +- 6 files changed, 71 insertions(+), 104 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 067305017..298648902 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -18,17 +18,7 @@ Item { readonly property string clockStyle: Config.options.background.clock.style property real implicitSize: 230 - property real hourHandLength: 72 - property real hourHandWidth: 20 - property real minuteHandLength: 95 - property real minuteHandWidth: Config.options.background.clock.cookie.minuteHandStyle === "bold" ? hourHandWidth : - Config.options.background.clock.cookie.minuteHandStyle === "medium" ? 12 : 5 - property real centerDotSize: 10 property real hourDotSize: 12 - property real hourMarkSize: 135 - property real secondDotSize: 20 - property real secondHandWidth: 2 - property real secondHandLength: 100 property real hourLineSize: 4 property real minuteLineSize: 2 property real hourNumberSize: 36 @@ -37,7 +27,7 @@ Item { property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer property color colOnBackground: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.5) - property color colHourHand: Appearance.colors.colPrimaryContainer + property color colHourHand: Appearance.colors.colPrimary property color colMinuteHand: Appearance.colors.colSecondary property color colSecondHand: Appearance.colors.colTertiary property color colOnHourHand: Appearance.colors.colOnPrimary @@ -52,7 +42,7 @@ Item { implicitHeight: implicitSize DropShadow { - source: cookie + source: cookie anchors.fill: source horizontalOffset: 0 verticalOffset: 2 @@ -77,14 +67,14 @@ Item { anchors.fill: parent color: root.colOnBackground } - + // Stupid extra hour marks in the middle FadeLoader { id: hourMarksLoader anchors.centerIn: parent shown: Config.options.background.clock.cookie.hourMarks sourceComponent: HourMarks { - implicitSize: root.hourMarkSize * (1.75 - 0.75 * hourMarksLoader.opacity) + implicitSize: 135 * (1.75 - 0.75 * hourMarksLoader.opacity) color: root.colTimeIndicators colOnBackground: root.colOnBackground } @@ -99,45 +89,45 @@ Item { Behavior on scale { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - + sourceComponent: TimeColumn { color: root.colOnBackground } } - // Hour hand - HourHand { + FadeLoader { anchors.fill: parent - handLength: root.hourHandLength - handWidth: root.hourHandWidth - clockHour: root.clockHour - clockMinute: root.clockMinute - style: Config.options.background.clock.cookie.hourHandStyle - color: root.colHourHand + z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 + shown: Config.options.background.clock.cookie.hourHandStyle !== "hide" + sourceComponent: HourHand { + clockHour: root.clockHour + clockMinute: root.clockMinute + style: Config.options.background.clock.cookie.hourHandStyle + color: root.colHourHand + } } // Minute hand - MinuteHand { + FadeLoader { anchors.fill: parent - handWidth: root.minuteHandWidth - handLength: root.minuteHandLength - clockMinute: root.clockMinute - style: Config.options.background.clock.cookie.minuteHandStyle - color: root.colMinuteHand + shown: Config.options.background.clock.cookie.minuteHandStyle !== "hide" + sourceComponent: MinuteHand { + anchors.fill: parent + clockMinute: root.clockMinute + style: Config.options.background.clock.cookie.minuteHandStyle + color: root.colMinuteHand + } } // Second hand - Loader { + FadeLoader { id: secondHandLoader - active: Config.options.time.secondPrecision && Config.options.background.clock.cookie.secondHandStyle !== "none" + z: (Config.options.background.clock.cookie.secondHandStyle === "line") ? 2 : 3 + shown: Config.options.time.secondPrecision && Config.options.background.clock.cookie.secondHandStyle !== "none" anchors.fill: parent - z: 2 sourceComponent: SecondHand { id: secondHand - handWidth: root.secondHandWidth - handLength: root.secondHandLength - dotSize: root.secondDotSize clockSecond: root.clockSecond style: Config.options.background.clock.cookie.secondHandStyle color: root.colSecondHand @@ -145,17 +135,15 @@ Item { } // Center dot - Rectangle { - visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" && Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true + FadeLoader { z: 4 - opacity: Config.options.background.clock.cookie.minuteHandStyle !== "bold" ? 1.0 : 0 - color: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? root.colBackground : root.colMinuteHand anchors.centerIn: parent - implicitWidth: centerDotSize - implicitHeight: implicitWidth - radius: implicitWidth / 2 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + shown: Config.options.background.clock.cookie.minuteHandStyle !== "bold" + sourceComponent: Rectangle { + color: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? root.colBackground : root.colMinuteHand + implicitWidth: 8 + implicitHeight: implicitWidth + radius: width / 2 } } @@ -166,5 +154,4 @@ Item { style: Config.options.background.clock.cookie.dateStyle dateSquareSize: root.dateSquareSize } - } diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml index 97fa61036..91dc24570 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -5,45 +5,30 @@ import QtQuick Item { id: root - anchors.fill: parent required property int clockHour required property int clockMinute property real handLength: 72 - property real handWidth: 16 + property real handWidth: 18 property string style: "fill" property color color: Appearance.colors.colPrimary - property real fillColorAlpha: root.style === "stroke" ? 0.0 : 1.0 // for animation + property real fillColorAlpha: root.style === "stroke" ? 0 : 1 Behavior on fillColorAlpha { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) - z: root.style === "fill" ? 3 : 1 - - opacity: root.style === "hide" ? 0.0 : 1.0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } Rectangle { anchors.verticalCenter: parent.verticalCenter - x: { - let position = parent.width / 2 - root.handWidth / 2; - if (root.style === "classic") position -= 15; - return position; - } + x: (parent.width - root.handWidth) / 2 - 15 * (root.style === "classic") width: root.handLength height: root.style === "classic" ? 8 : root.handWidth - radius: root.style === "classic" ? 2 : root.handWidth / 2 - color : Qt.rgba(root.color.r, root.color.g, root.color.b, fillColorAlpha) - + color : Qt.rgba(root.color.r, root.color.g, root.color.b, root.fillColorAlpha) border.color: root.color border.width: 4 - Behavior on x { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml index c4db1765b..29ec8f893 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml @@ -8,21 +8,17 @@ Item { anchors.fill: parent required property int clockMinute - property real handWidth: 16 - property real handLength: 95 property string style: "medium" + property real handLength: 95 + property real handWidth: style === "bold" ? 18 : style === "medium" ? 12 : 5 property color color: Appearance.colors.colSecondary z: root.style === "thin" ? 1 : 3 rotation: -90 + (360 / 60) * root.clockMinute - opacity: root.style === "hide" ? 0.0 : 1.0 Behavior on rotation { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - Behavior on opacity { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } Rectangle { anchors.verticalCenter: parent.verticalCenter diff --git a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml index e9151370c..c05003020 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/SecondHand.qml @@ -1,6 +1,7 @@ pragma ComponentBehavior: Bound import qs.modules.common +import qs.modules.common.widgets import QtQuick Item { @@ -14,50 +15,23 @@ Item { property string style: "hide" property color color: Appearance.colors.colSecondary - z: root.style === "line" ? 2 : 3 - rotation: (360 / 60 * clockSecond) + 90 // +90 degrees to align with minute hand - opacity: root.style !== "hide" ? 1.0 : 0 + rotation: (360 / 60 * clockSecond) + 90 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } Behavior on rotation { enabled: Config.options.background.clock.cookie.constantlyRotate // Animating every second is expensive... animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } Rectangle { - implicitWidth: root.style === "dot" ? root.dotSize : root.handLength - implicitHeight: root.style === "dot" ? root.dotSize : root.handWidth - radius: root.style === "dot" ? implicitWidth / 2 : root.handWidth / 2 - color: root.color - Behavior on implicitHeight { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - Behavior on implicitWidth { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } anchors { left: parent.left verticalCenter: parent.verticalCenter leftMargin: 10 } - } - Rectangle { - // Dot on the classic style - opacity: root.style === "classic" ? 1.0 : 0.0 - implicitHeight: root.style === "classic" ? 14 : 0 - implicitWidth: root.style === "classic" ? 14 : 0 + implicitWidth: root.style === "dot" ? root.dotSize : root.handLength + implicitHeight: root.style === "dot" ? root.dotSize : root.handWidth + radius: Math.min(width, height) / 2 color: root.color - radius: Appearance.rounding.small - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: 40 - } - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } Behavior on implicitHeight { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } @@ -65,4 +39,29 @@ Item { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } } -} \ No newline at end of file + + // Classic style dot in the middle of the hand + FadeLoader { + id: classicDotLoader + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + } + shown: root.style === "classic" + Rectangle { + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: 40 + } + implicitWidth: root.style === "classic" ? 14 : 0 + implicitHeight: implicitWidth + color: root.color + radius: Appearance.rounding.small + + Behavior on implicitWidth { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + } + } +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml index 100e72284..be0389677 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/minuteMarks/MinuteMarks.qml @@ -30,7 +30,7 @@ Item { sourceComponent: BigHourNumbers { numberSize: 80 color: root.color - margins: 70 - bigHourNumbersLoader.opacity * 40 + margins: 20 - 10 * bigHourNumbersLoader.opacity } } diff --git a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml index 16e09057d..a0cdfeafc 100644 --- a/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml +++ b/.config/quickshell/ii/modules/common/widgets/MaterialCookie.qml @@ -54,7 +54,7 @@ Item { var radius = root.implicitSize / 2 - root.amplitude for (var i = 0; i <= steps; i++) { var angle = (i / steps) * 2 * Math.PI - var rotatedAngle = angle * root.sides + Math.PI/2 + (root.shapeRotation * -root.constantlyRotate) + var rotatedAngle = angle * root.sides + Math.PI/2 + (root.shapeRotation * root.constantlyRotate) var wave = Math.sin(rotatedAngle) * root.amplitude var x = Math.cos(angle) * (radius + wave) + cx var y = Math.sin(angle) * (radius + wave) + cy From c197f6eab22ff964c645ccb258f22a58a61f1044 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:57:26 +0200 Subject: [PATCH 120/125] bg clock: fix am pm parsing for 1 digit hours --- .../ii/modules/background/cookieClock/TimeColumn.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml index f667dc86f..bcad89538 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/TimeColumn.qml @@ -21,7 +21,8 @@ Column { delegate: StyledText { required property string modelData - property bool isAmPm: !modelData.match(/\d{2}/i) + text: modelData.padStart(2, "0") + property bool isAmPm: !text.match(/\d{2}/i) property real numberSizeWithoutGlow: isAmPm ? 26 : 68 property real numberSizeWithGlow: isAmPm ? 20 : 40 property real numberSize: root.hourMarksEnabled ? numberSizeWithGlow : numberSizeWithoutGlow @@ -37,8 +38,6 @@ Column { Behavior on numberSize { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - - text: modelData.padStart(2, "0") } } } From 41c2814610c95e9b82a4e4848d2a9c46c3cbf27e Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 17:40:24 +0200 Subject: [PATCH 121/125] cookie clock: cleaner date indicator, adjust colors --- .../background/cookieClock/CookieClock.qml | 18 ++--- .../background/cookieClock/CookieQuote.qml | 1 + .../background/cookieClock/HourMarks.qml | 2 +- .../background/cookieClock/MinuteHand.qml | 1 - .../dateIndicator/DateIndicator.qml | 68 ++++++++----------- .../dateIndicator/RectangleDate.qml | 23 +------ .../dateIndicator/RotatingDate.qml | 36 ++++------ 7 files changed, 55 insertions(+), 94 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 298648902..95c928d86 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -26,7 +26,8 @@ Item { property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer - property color colOnBackground: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.5) + property color colOnBackground: ColorUtils.mix(Appearance.colors.colSecondary, Appearance.colors.colSecondaryContainer, 0.3) + property color colBackgroundInfo: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.55) property color colHourHand: Appearance.colors.colPrimary property color colMinuteHand: Appearance.colors.colSecondary property color colSecondHand: Appearance.colors.colTertiary @@ -75,8 +76,8 @@ Item { shown: Config.options.background.clock.cookie.hourMarks sourceComponent: HourMarks { implicitSize: 135 * (1.75 - 0.75 * hourMarksLoader.opacity) - color: root.colTimeIndicators - colOnBackground: root.colOnBackground + color: root.colOnBackground + colOnBackground: ColorUtils.mix(root.colBackgroundInfo, root.colOnBackground, 0.5) } } @@ -91,14 +92,14 @@ Item { } sourceComponent: TimeColumn { - color: root.colOnBackground + color: root.colBackgroundInfo } } // Hour hand FadeLoader { anchors.fill: parent - z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 + z: 1 shown: Config.options.background.clock.cookie.hourHandStyle !== "hide" sourceComponent: HourHand { clockHour: root.clockHour @@ -111,6 +112,7 @@ Item { // Minute hand FadeLoader { anchors.fill: parent + z: 2 shown: Config.options.background.clock.cookie.minuteHandStyle !== "hide" sourceComponent: MinuteHand { anchors.fill: parent @@ -124,7 +126,7 @@ Item { FadeLoader { id: secondHandLoader z: (Config.options.background.clock.cookie.secondHandStyle === "line") ? 2 : 3 - shown: Config.options.time.secondPrecision && Config.options.background.clock.cookie.secondHandStyle !== "none" + shown: Config.options.time.secondPrecision && Config.options.background.clock.cookie.secondHandStyle !== "hide" anchors.fill: parent sourceComponent: SecondHand { id: secondHand @@ -141,7 +143,7 @@ Item { shown: Config.options.background.clock.cookie.minuteHandStyle !== "bold" sourceComponent: Rectangle { color: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? root.colBackground : root.colMinuteHand - implicitWidth: 8 + implicitWidth: 6 implicitHeight: implicitWidth radius: width / 2 } @@ -150,7 +152,7 @@ Item { // Date DateIndicator { anchors.fill: parent - colOnBackground: root.colOnBackground + colOnBackground: root.colBackgroundInfo style: Config.options.background.clock.cookie.dateStyle dateSquareSize: root.dateSquareSize } diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml index 9e049a657..8fef7313a 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml @@ -50,6 +50,7 @@ Item { id: quoteStyledText horizontalAlignment: Text.AlignLeft text: Config.options.background.quote + color: Appearance.colors.colOnSecondaryContainer font { family: Appearance.font.family.reading pixelSize: Appearance.font.pixelSize.large diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml index c20b14a60..ec1bfab8b 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourMarks.qml @@ -13,7 +13,7 @@ Item { property real markWidth: 4 property color color: Appearance.colors.colOnSecondaryContainer property color colOnBackground: Appearance.colors.colSecondaryContainer - property real padding: 10 + property real padding: 8 Rectangle { color: root.color diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml index 29ec8f893..0b8a78d16 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteHand.qml @@ -13,7 +13,6 @@ Item { property real handWidth: style === "bold" ? 18 : style === "medium" ? 12 : 5 property color color: Appearance.colors.colSecondary - z: root.style === "thin" ? 1 : 3 rotation: -90 + (360 / 60) * root.clockMinute Behavior on rotation { diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml index d2626d751..2056bb692 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml @@ -9,83 +9,69 @@ import QtQuick Item { id: root - readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle property string style: "rotating" property color colOnBackground: Appearance.colors.colOnSecondaryContainer property color colBackground: Appearance.colors.colOnSecondaryContainer property real dateSquareSize: 64 // Rotating date - Loader { + FadeLoader { anchors.fill: parent - active: opacity > 0 + shown: Config.options.background.clock.cookie.dateStyle === "rotating" sourceComponent: RotatingDate { - style: root.style + color: root.colOnBackground } } // Rectangle date (only today's number) in right side of the clock - Loader { + FadeLoader { id: rectLoader - - property real animIndex: root.style === "rect" ? 1.0 : 0.0 - Behavior on animIndex { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + shown: root.style === "rect" + anchors { + verticalCenter: parent.verticalCenter + right: parent.right + rightMargin: 40 - rectLoader.opacity * 30 } - active: animIndex > 0 - - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - sourceComponent: RectangleDate { color: Appearance.colors.colSecondaryContainerHover radius: Appearance.rounding.small - animIndex: rectLoader.animIndex + implicitWidth: 45 * rectLoader.opacity + implicitHeight: 30 * rectLoader.opacity } } - // Date bubble / day - Loader { + // Bubble style: day of month + FadeLoader { id: dayBubbleLoader - property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 - Behavior on targetSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - - active: targetSize > 0 - width: targetSize - height: targetSize - + shown: root.style === "bubble" + property real targetSize: root.dateSquareSize * opacity anchors { left: parent.left - bottom: parent.bottom - topMargin: 50 + top: parent.top } + sourceComponent: BubbleDate { + implicitWidth: dayBubbleLoader.targetSize + implicitHeight: dayBubbleLoader.targetSize bubbleIndex: 0 targetSize: dayBubbleLoader.targetSize } } - // Date bubble / month - Loader { + // Bubble style: month + FadeLoader { id: monthBubbleLoader - property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 - Behavior on targetSize { - animation: Appearance.animation.elementResize.numberAnimation.createObject(this) - } - - width: targetSize - height: targetSize - active: targetSize > 0 - + shown: root.style === "bubble" + property real targetSize: root.dateSquareSize * opacity anchors { right: parent.right - top: parent.top - bottomMargin: 50 + bottom: parent.bottom } + sourceComponent: BubbleDate { + implicitWidth: monthBubbleLoader.targetSize + implicitHeight: monthBubbleLoader.targetSize bubbleIndex: 1 targetSize: monthBubbleLoader.targetSize } diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RectangleDate.qml index c2410c81e..47653dae3 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RectangleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RectangleDate.qml @@ -8,34 +8,15 @@ import QtQuick Rectangle { id: rect readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle - property real animIndex: 0 - opacity: animIndex - - width: 45 * animIndex - height: 30 * animIndex - - x: root.dialStyle === "numbers" ? -40 : -10 - y: root.dialStyle === "numbers" ? 55 : 0 - - Behavior on x { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - Behavior on y { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } StyledText { - opacity: root.style === "rect" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } anchors.centerIn: parent color: Appearance.colors.colSecondaryHover - text: DateTime.date.substring(5, 7) + text: Qt.locale().toString(DateTime.clock.date, "dd") font { family: Appearance.font.family.expressive pixelSize: 20 weight: 1000 } } -} \ No newline at end of file +} diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml index 34fbef94e..664c3aabc 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml @@ -10,6 +10,11 @@ Item { id: root property string style: Config.options.background.clock.cookie.dateStyle + property color color: Appearance.colors.colOnSecondaryContainer + property real angleStep: 12 * Math.PI / 180 + property string dateText: Qt.locale().toString(DateTime.clock.date, "ddd dd") + + readonly property int clockSecond: DateTime.clock.seconds readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle readonly property bool timeIndicators: Config.options.background.clock.cookie.timeIndicators @@ -18,20 +23,9 @@ Item { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } - property string dateText: Qt.locale().toString(DateTime.clock.date, "ddd dd") - property real angleStep: Math.PI / 2.35 / dateText.length - - property color dayColor: Appearance.colors.colSecondary - property color monthColor: Appearance.colors.colSecondaryHover - - opacity: style === "rotating" ? 1.0 : 0.0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - rotation: { if (!Config.options.time.secondPrecision) return 0 - else return secondHandLoader.item.rotation + 45 // +45 to center the text + else return (360 / 60 * clockSecond) + 180 - (angleStep / Math.PI * 180 * dateText.length) / 2 } Repeater { @@ -40,20 +34,18 @@ Item { delegate: Text { required property int index property real angle: index * root.angleStep - Math.PI / 2 - x: root.width / 2 + root.radius * Math.cos(angle) - width / 2 y: root.height / 2 + root.radius * Math.sin(angle) - height / 2 - - text: root.dateText.charAt(index) - - font.family: Appearance.font.family.title - font.pixelSize: 30 - font.weight: Font.DemiBold - - color: index < 3 ? root.dayColor : root.monthColor - rotation: angle * 180 / Math.PI + 90 + color: root.color + font { + family: Appearance.font.family.title + pixelSize: 30 + weight: Font.DemiBold + } + + text: root.dateText.charAt(index) } } } From af5a7964d0bdb750b1b2948048a85346b12a6b82 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 17:52:08 +0200 Subject: [PATCH 122/125] cookie clock: adjust colors and terminology --- .../background/cookieClock/CookieClock.qml | 16 ++++++++++------ .../modules/background/cookieClock/HourHand.qml | 2 +- .../cookieClock/dateIndicator/BubbleDate.qml | 4 ++-- .../cookieClock/dateIndicator/DateIndicator.qml | 9 ++++----- .config/quickshell/ii/modules/common/Config.qml | 12 ++++++------ .../ii/modules/settings/InterfaceConfig.qml | 10 +++++----- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 95c928d86..ba2f4721e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -26,7 +26,7 @@ Item { property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer - property color colOnBackground: ColorUtils.mix(Appearance.colors.colSecondary, Appearance.colors.colSecondaryContainer, 0.3) + property color colOnBackground: ColorUtils.mix(Appearance.colors.colSecondary, Appearance.colors.colSecondaryContainer, 0.15) property color colBackgroundInfo: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.55) property color colHourHand: Appearance.colors.colPrimary property color colMinuteHand: Appearance.colors.colSecondary @@ -58,7 +58,7 @@ Item { z: 0 implicitSize: root.implicitSize amplitude: implicitSize / 70 - sides: Config.options.background.clock.clockSides + sides: Config.options.background.clock.cookie.sides color: root.colBackground constantlyRotate: Config.options.background.clock.cookie.constantlyRotate } @@ -150,10 +150,14 @@ Item { } // Date - DateIndicator { + FadeLoader { anchors.fill: parent - colOnBackground: root.colBackgroundInfo - style: Config.options.background.clock.cookie.dateStyle - dateSquareSize: root.dateSquareSize + shown: Config.options.background.clock.cookie.dateStyle !== "hide" + + sourceComponent: DateIndicator { + color: root.colBackgroundInfo + style: Config.options.background.clock.cookie.dateStyle + dateSquareSize: root.dateSquareSize + } } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml index 91dc24570..c38960256 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -13,7 +13,7 @@ Item { property string style: "fill" property color color: Appearance.colors.colPrimary - property real fillColorAlpha: root.style === "stroke" ? 0 : 1 + property real fillColorAlpha: root.style === "hollow" ? 0 : 1 Behavior on fillColorAlpha { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml index 079c9650a..3a86ccbbb 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml @@ -14,7 +14,7 @@ Item { z: 5 sides: bubbleIndex === 0 ? 4 : 1 anchors.centerIn: parent - color: bubbleIndex === 0.0 ? Appearance.colors.colPrimaryContainer : Appearance.colors.colTertiaryContainer + color: bubbleIndex === 0.0 ? Appearance.colors.colTertiaryContainer : Appearance.colors.colPrimaryContainer implicitSize: targetSize constantlyRotate: Config.options.background.clock.cookie.constantlyRotate } @@ -22,7 +22,7 @@ Item { z: 6 anchors.centerIn: parent text: bubbleIndex === 0.0 ? DateTime.date.substring(5, 7) : DateTime.date.substring(8, 10) - color: bubbleIndex === 0.0 ? Appearance.colors.colPrimary : Appearance.colors.colTertiary + color: bubbleIndex === 0.0 ? Appearance.colors.colTertiary : Appearance.colors.colPrimary opacity: root.style === "bubble" ? 1.0 : 0 font { family: Appearance.font.family.expressive diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml index 2056bb692..0ac61a1e1 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml @@ -10,8 +10,7 @@ import QtQuick Item { id: root property string style: "rotating" - property color colOnBackground: Appearance.colors.colOnSecondaryContainer - property color colBackground: Appearance.colors.colOnSecondaryContainer + property color color: Appearance.colors.colOnSecondaryContainer property real dateSquareSize: 64 // Rotating date @@ -19,7 +18,7 @@ Item { anchors.fill: parent shown: Config.options.background.clock.cookie.dateStyle === "rotating" sourceComponent: RotatingDate { - color: root.colOnBackground + color: root.color } } @@ -34,7 +33,7 @@ Item { } sourceComponent: RectangleDate { - color: Appearance.colors.colSecondaryContainerHover + color: ColorUtils.mix(root.color, Appearance.colors.colSecondaryContainerHover, 0.5) radius: Appearance.rounding.small implicitWidth: 45 * rectLoader.opacity implicitHeight: 30 * rectLoader.opacity @@ -50,7 +49,7 @@ Item { left: parent.left top: parent.top } - + sourceComponent: BubbleDate { implicitWidth: dayBubbleLoader.targetSize implicitHeight: dayBubbleLoader.targetSize diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 72e5ee721..904866b6a 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -129,13 +129,13 @@ Singleton { property bool show: true property string style: "cookie" // Options: "cookie", "digital" property real scale: 1 - property int clockSides: 12 property JsonObject cookie: JsonObject { - property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" - property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" - property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide" - property string secondHandStyle: "dot" // Options: "dot", "line" , "none" - property string dateStyle: "rotating" // Options: "rotating", "rect", "bubble" , "none" + property int sides: 14 + property string dialNumberStyle: "full" // Options: "dots" , "numbers", "full" , "none" + property string hourHandStyle: "fill" // Options: "classic", "fill", "hollow", "hide" + property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide" + property string secondHandStyle: "dot" // Options: "dot", "line" , "hide" + property string dateStyle: "bubble" // Options: "rotating", "rect", "bubble" , "hide" property bool timeIndicators: true property bool hourMarks: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 273948d7d..8396a917f 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -115,9 +115,9 @@ ContentPage { value: "classic" }, { - displayName: Translation.tr("Stroke"), + displayName: Translation.tr("Hollow"), icon: "stroke_partial", - value: "stroke" + value: "hollow" }, { displayName: Translation.tr("Fill"), @@ -214,7 +214,7 @@ ContentPage { { displayName: "", icon: "block", - value: "none" + value: "hide" }, { displayName: Translation.tr("Bubble"), @@ -239,12 +239,12 @@ ContentPage { visible: Config.options.background.clock.style === "cookie" icon: "support" text: Translation.tr("Clock sides") - value: Config.options.background.clock.clockSides + value: Config.options.background.clock.cookie.sides from: 1 to: 36 stepSize: 1 onValueChanged: { - Config.options.background.clock.clockSides = value; + Config.options.background.clock.cookie.sides = value; } } From 1f5527164cd08cae42874ed60a54d66ef446022f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 17:58:24 +0200 Subject: [PATCH 123/125] settings: rearrange cookie clock settings --- .../ii/modules/settings/InterfaceConfig.qml | 136 +++++++++--------- 1 file changed, 70 insertions(+), 66 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 8396a917f..fd2bf3e8f 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -55,10 +55,76 @@ ContentPage { ] } } + + ContentSubsection { + visible: Config.options.background.clock.style === "cookie" + title: Translation.tr("Cookie clock settings") + ConfigSpinBox { + visible: Config.options.background.clock.style === "cookie" + icon: "support" + text: Translation.tr("Sides") + value: Config.options.background.clock.cookie.sides + from: 1 + to: 36 + stepSize: 1 + onValueChanged: { + Config.options.background.clock.cookie.sides = value; + } + } + + ConfigSwitch { + visible: Config.options.background.clock.style === "cookie" + buttonIcon: "autoplay" + text: Translation.tr("Constantly rotate") + checked: Config.options.background.clock.cookie.constantlyRotate + onCheckedChanged: { + Config.options.background.clock.cookie.constantlyRotate = checked; + } + StyledToolTip { + text: "Makes the clock always rotate. This is extremely expensive\n(expect 50% usage on Intel UHD Graphics) and thus impractical." + } + } + + ConfigRow { + visible: Config.options.background.clock.style === "cookie" + + ConfigSwitch { + enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" + buttonIcon: "brightness_7" + text: Translation.tr("Hour marks") + checked: Config.options.background.clock.cookie.hourMarks + onEnabledChanged: { + checked = Config.options.background.clock.cookie.hourMarks; + } + onCheckedChanged: { + Config.options.background.clock.cookie.hourMarks = checked; + } + StyledToolTip { + text: "Can only be turned on using the 'Dots' or 'Full' dial style for aesthetic reasons" + } + } + + ConfigSwitch { + enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" + buttonIcon: "farsight_digital" + text: Translation.tr("Clock indicator") + checked: Config.options.background.clock.cookie.timeIndicators + onEnabledChanged: { + checked = Config.options.background.clock.cookie.timeIndicators; + } + onCheckedChanged: { + Config.options.background.clock.cookie.timeIndicators = checked; + } + StyledToolTip { + text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons" + } + } + } + } ContentSubsection { visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Dial numbers style") + title: Translation.tr("Dial style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.dialNumberStyle onSelected: newValue => { @@ -97,7 +163,7 @@ ContentPage { ContentSubsection { visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Hour hand style") + title: Translation.tr("Hour hand") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.hourHandStyle onSelected: newValue => { @@ -130,7 +196,7 @@ ContentPage { ContentSubsection { visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Minute hand style") + title: Translation.tr("Minute hand") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.minuteHandStyle @@ -169,7 +235,7 @@ ContentPage { ContentSubsection { visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Seconds hand style") + title: Translation.tr("Second hand") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.secondHandStyle @@ -235,68 +301,6 @@ ContentPage { } } - ConfigSpinBox { - visible: Config.options.background.clock.style === "cookie" - icon: "support" - text: Translation.tr("Clock sides") - value: Config.options.background.clock.cookie.sides - from: 1 - to: 36 - stepSize: 1 - onValueChanged: { - Config.options.background.clock.cookie.sides = value; - } - } - - ConfigSwitch { - visible: Config.options.background.clock.style === "cookie" - buttonIcon: "autoplay" - text: Translation.tr("Constantly rotate") - checked: Config.options.background.clock.cookie.constantlyRotate - onCheckedChanged: { - Config.options.background.clock.cookie.constantlyRotate = checked; - } - StyledToolTip { - text: "Makes the clock always rotate. This is extremely expensive\n(expect 50% usage on Intel UHD Graphics) and thus impractical." - } - } - - ConfigRow { - visible: Config.options.background.clock.style === "cookie" - - ConfigSwitch { - enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" - buttonIcon: "brightness_7" - text: Translation.tr("Hour marks") - checked: Config.options.background.clock.cookie.hourMarks - onEnabledChanged: { - checked = Config.options.background.clock.cookie.hourMarks; - } - onCheckedChanged: { - Config.options.background.clock.cookie.hourMarks = checked; - } - StyledToolTip { - text: "Can only be turned on using the 'Dots' or 'Full' dial style for aesthetic reasons" - } - } - - ConfigSwitch { - enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" - buttonIcon: "farsight_digital" - text: Translation.tr("Clock indicator") - checked: Config.options.background.clock.cookie.timeIndicators - onEnabledChanged: { - checked = Config.options.background.clock.cookie.timeIndicators; - } - onCheckedChanged: { - Config.options.background.clock.cookie.timeIndicators = checked; - } - StyledToolTip { - text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons" - } - } - } - ContentSubsection { title: Translation.tr("Quote settings") ConfigSwitch { From edc83764c4a93b9b4386dea52d8de053f9009e65 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 18:14:57 +0200 Subject: [PATCH 124/125] cookie clock: remove useless vars, adjust settings icons --- .../background/cookieClock/CookieClock.qml | 8 ------ .../dateIndicator/DateIndicator.qml | 4 +-- .../dateIndicator/RotatingDate.qml | 2 +- .../quickshell/ii/modules/common/Config.qml | 2 +- .../ii/modules/settings/InterfaceConfig.qml | 26 +++++++++---------- 5 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index ba2f4721e..97a143e58 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -18,11 +18,6 @@ Item { readonly property string clockStyle: Config.options.background.clock.style property real implicitSize: 230 - property real hourDotSize: 12 - property real hourLineSize: 4 - property real minuteLineSize: 2 - property real hourNumberSize: 36 - property real dateSquareSize: 64 property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer @@ -31,8 +26,6 @@ Item { property color colHourHand: Appearance.colors.colPrimary property color colMinuteHand: Appearance.colors.colSecondary property color colSecondHand: Appearance.colors.colTertiary - property color colOnHourHand: Appearance.colors.colOnPrimary - property color colTimeIndicators: Appearance.colors.colSecondaryContainerHover readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 @@ -157,7 +150,6 @@ Item { sourceComponent: DateIndicator { color: root.colBackgroundInfo style: Config.options.background.clock.cookie.dateStyle - dateSquareSize: root.dateSquareSize } } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml index 0ac61a1e1..fb286418f 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml @@ -9,14 +9,14 @@ import QtQuick Item { id: root - property string style: "rotating" + property string style: "bubble" property color color: Appearance.colors.colOnSecondaryContainer property real dateSquareSize: 64 // Rotating date FadeLoader { anchors.fill: parent - shown: Config.options.background.clock.cookie.dateStyle === "rotating" + shown: Config.options.background.clock.cookie.dateStyle === "border" sourceComponent: RotatingDate { color: root.color } diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml index 664c3aabc..ec4303dba 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/RotatingDate.qml @@ -18,7 +18,7 @@ Item { readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle readonly property bool timeIndicators: Config.options.background.clock.cookie.timeIndicators - property real radius: style === "rotating" ? 90 : 0 + property real radius: style === "border" ? 90 : 0 Behavior on radius { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 904866b6a..1b23ec932 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -135,7 +135,7 @@ Singleton { property string hourHandStyle: "fill" // Options: "classic", "fill", "hollow", "hide" property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide" property string secondHandStyle: "dot" // Options: "dot", "line" , "hide" - property string dateStyle: "bubble" // Options: "rotating", "rect", "bubble" , "hide" + property string dateStyle: "bubble" // Options: "border", "rect", "bubble" , "hide" property bool timeIndicators: true property bool hourMarks: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index fd2bf3e8f..4f6ba1920 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -61,7 +61,7 @@ ContentPage { title: Translation.tr("Cookie clock settings") ConfigSpinBox { visible: Config.options.background.clock.style === "cookie" - icon: "support" + icon: "add_triangle" text: Translation.tr("Sides") value: Config.options.background.clock.cookie.sides from: 1 @@ -106,8 +106,8 @@ ContentPage { ConfigSwitch { enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" - buttonIcon: "farsight_digital" - text: Translation.tr("Clock indicator") + buttonIcon: "timer_10" + text: Translation.tr("Digits in the middle") checked: Config.options.background.clock.cookie.timeIndicators onEnabledChanged: { checked = Config.options.background.clock.cookie.timeIndicators; @@ -149,12 +149,12 @@ ContentPage { }, { displayName: Translation.tr("Full"), - icon: "avg_pace", + icon: "history_toggle_off", value: "full" }, { displayName: Translation.tr("Numbers"), - icon: "123", + icon: "counter_1", value: "numbers" } ] @@ -181,13 +181,13 @@ ContentPage { value: "classic" }, { - displayName: Translation.tr("Hollow"), + displayName: Translation.tr("circle"), icon: "stroke_partial", value: "hollow" }, { displayName: Translation.tr("Fill"), - icon: "stroke_full", + icon: "eraser_size_5", value: "fill" }, ] @@ -216,17 +216,17 @@ ContentPage { }, { displayName: Translation.tr("Thin"), - icon: "pen_size_1", + icon: "line_end", value: "thin" }, { displayName: Translation.tr("Medium"), - icon: "pen_size_3", + icon: "eraser_size_2", value: "medium" }, { displayName: Translation.tr("Bold"), - icon: "pen_size_5", + icon: "eraser_size_4", value: "bold" }, ] @@ -288,13 +288,13 @@ ContentPage { value: "bubble" }, { - displayName: Translation.tr("Rotating"), + displayName: Translation.tr("Border"), icon: "rotate_right", - value: "rotating" + value: "border" }, { displayName: Translation.tr("Rect"), - icon: "square", + icon: "rectangle", value: "rect" } ] From 5a5328b1cb2b4570291696075832a080d2cf5412 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 18:16:02 +0200 Subject: [PATCH 125/125] settings: cookie clock: fix wrong name/icon --- .config/quickshell/ii/modules/settings/InterfaceConfig.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 4f6ba1920..9e08b1d04 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -181,8 +181,8 @@ ContentPage { value: "classic" }, { - displayName: Translation.tr("circle"), - icon: "stroke_partial", + displayName: Translation.tr("Hollow"), + icon: "circle", value: "hollow" }, {