move Theme, SystemStats, Modules to shell/services/

This commit is contained in:
Damocles 2026-04-17 22:07:00 +02:00
parent 197f6976e0
commit 989182d603
59 changed files with 432 additions and 388 deletions

View file

@ -3,6 +3,7 @@ import QtQuick.Effects
import Quickshell
import Quickshell.Wayland
import "." as M
import "../services" as S
PanelWindow {
id: root
@ -44,9 +45,9 @@ PanelWindow {
Text {
text: Qt.formatDateTime(clock.date, "HH")
color: M.Theme.base0D
color: S.Theme.base0D
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.family: S.Theme.fontFamily
font.bold: true
anchors.verticalCenter: parent.verticalCenter
}
@ -54,22 +55,22 @@ PanelWindow {
text: ":"
color: colon._colors[colon._colorIdx % colon._colors.length]
Behavior on color {
enabled: !M.Theme.reducedMotion
enabled: !S.Theme.reducedMotion
ColorAnimation {
duration: 500
}
}
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.family: S.Theme.fontFamily
font.bold: true
opacity: colon.opacity
anchors.verticalCenter: parent.verticalCenter
}
Text {
text: Qt.formatDateTime(clock.date, "mm")
color: M.Theme.base0E
color: S.Theme.base0E
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.family: S.Theme.fontFamily
font.bold: true
anchors.verticalCenter: parent.verticalCenter
}
@ -79,7 +80,7 @@ PanelWindow {
source: glowSource
anchors.fill: glowSource
shadowEnabled: true
shadowColor: M.Theme.base0D
shadowColor: S.Theme.base0D
shadowBlur: 1.0
shadowVerticalOffset: 0
shadowHorizontalOffset: 0
@ -92,10 +93,10 @@ PanelWindow {
Text {
text: Qt.formatDateTime(clock.date, "HH")
color: M.Theme.base0D
color: S.Theme.base0D
opacity: 0.85
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.family: S.Theme.fontFamily
font.bold: true
anchors.verticalCenter: parent.verticalCenter
}
@ -103,16 +104,16 @@ PanelWindow {
id: colon
text: ":"
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.family: S.Theme.fontFamily
font.bold: true
opacity: 0.85
anchors.verticalCenter: parent.verticalCenter
property int _colorIdx: 0
readonly property var _colors: [M.Theme.base08, M.Theme.base09, M.Theme.base0A, M.Theme.base0B, M.Theme.base0C, M.Theme.base0D, M.Theme.base0E, M.Theme.base05]
readonly property var _colors: [S.Theme.base08, S.Theme.base09, S.Theme.base0A, S.Theme.base0B, S.Theme.base0C, S.Theme.base0D, S.Theme.base0E, S.Theme.base05]
color: _colors[_colorIdx % _colors.length]
Behavior on color {
enabled: !M.Theme.reducedMotion
enabled: !S.Theme.reducedMotion
ColorAnimation {
duration: 500
}
@ -140,7 +141,7 @@ PanelWindow {
Connections {
target: clock
function onDateChanged() {
if (M.Theme.reducedMotion)
if (S.Theme.reducedMotion)
return;
colon._colorIdx++;
colonAnim.restart();
@ -149,10 +150,10 @@ PanelWindow {
}
Text {
text: Qt.formatDateTime(clock.date, "mm")
color: M.Theme.base0E
color: S.Theme.base0E
opacity: 0.85
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.family: S.Theme.fontFamily
font.bold: true
anchors.verticalCenter: parent.verticalCenter
}
@ -164,16 +165,16 @@ PanelWindow {
id: dateText
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "dddd, dd MMMM yyyy")
color: M.Theme.base05
color: S.Theme.base05
opacity: 0.5
font.pixelSize: 18
font.family: M.Theme.fontFamily
font.family: S.Theme.fontFamily
font.letterSpacing: 4
layer.enabled: true
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: M.Theme.base0D
shadowColor: S.Theme.base0D
shadowBlur: 0.4
shadowVerticalOffset: 0
shadowHorizontalOffset: 0
@ -188,7 +189,7 @@ PanelWindow {
Rectangle {
anchors.fill: parent
color: M.Theme.base02
color: S.Theme.base02
radius: 1
opacity: 0.3
}
@ -197,7 +198,7 @@ PanelWindow {
height: parent.height
color: colon._colors[colon._colorIdx % colon._colors.length]
Behavior on color {
enabled: !M.Theme.reducedMotion
enabled: !S.Theme.reducedMotion
ColorAnimation {
duration: 500
}
@ -206,7 +207,7 @@ PanelWindow {
opacity: 0.6
Behavior on width {
enabled: !M.Theme.reducedMotion
enabled: !S.Theme.reducedMotion
NumberAnimation {
duration: 50
}