diff --git a/.config/quickshell/modules/bar/SmallCircleButton.qml b/.config/quickshell/modules/bar/CircleUtilButton.qml similarity index 72% rename from .config/quickshell/modules/bar/SmallCircleButton.qml rename to .config/quickshell/modules/bar/CircleUtilButton.qml index 32c79d352..0651211c3 100644 --- a/.config/quickshell/modules/bar/SmallCircleButton.qml +++ b/.config/quickshell/modules/bar/CircleUtilButton.qml @@ -23,15 +23,6 @@ Button { radius: Appearance.rounding.full color: (button.down || extraActiveCondition) ? Appearance.colors.colLayer2Active : (button.hovered ? Appearance.colors.colLayer2Hover : Appearance.colors.colLayer2) - Behavior on color { - ColorAnimation { - duration: Appearance.animation.elementMove.duration - easing.type: Appearance.animation.elementMove.type - easing.bezierCurve: Appearance.animation.elementMove.bezierCurve - } - - } - } } diff --git a/.config/quickshell/modules/bar/UtilButtons.qml b/.config/quickshell/modules/bar/UtilButtons.qml index 24d773157..93b34d8d9 100644 --- a/.config/quickshell/modules/bar/UtilButtons.qml +++ b/.config/quickshell/modules/bar/UtilButtons.qml @@ -19,7 +19,7 @@ Rectangle { spacing: 4 anchors.centerIn: parent - SmallCircleButton { + CircleUtilButton { Layout.alignment: Qt.AlignVCenter onClicked: Hyprland.dispatch("exec grimblast copy area") @@ -32,7 +32,7 @@ Rectangle { } - SmallCircleButton { + CircleUtilButton { Layout.alignment: Qt.AlignVCenter onClicked: Hyprland.dispatch("exec hyprpicker -a") diff --git a/.config/quickshell/services/MaterialTheme.qml b/.config/quickshell/services/MaterialTheme.qml deleted file mode 100644 index c34441a1b..000000000 --- a/.config/quickshell/services/MaterialTheme.qml +++ /dev/null @@ -1,55 +0,0 @@ -pragma Singleton -pragma ComponentBehavior: Bound - -import "root:/modules/common" -import QtQuick -import Quickshell -import Quickshell.Io -import Qt.labs.platform - -Singleton { - id: root - property string filePath: `${StandardPaths.standardLocations(StandardPaths.StateLocation)[0]}/user/generated/colors.json` - - function reapplyTheme() { - themeFileView.reload() - } - - function applyColors(fileContent) { - const json = JSON.parse(fileContent) - for (const key in json) { - if (json.hasOwnProperty(key)) { - // Convert snake_case to CamelCase - const camelCaseKey = key.replace(/_([a-z])/g, (g) => g[1].toUpperCase()) - const m3Key = `m3${camelCaseKey}` - Appearance.m3colors[m3Key] = json[key] - } - } - - Appearance.m3colors.darkmode = (Appearance.m3colors.m3background.hslLightness < 0.5) - } - - Timer { - id: delayedFileRead - interval: ConfigOptions.hacks.arbitraryRaceConditionDelay - repeat: false - running: false - onTriggered: { - root.applyColors(themeFileView.text()) - } - } - - FileView { - id: themeFileView - path: root.filePath - watchChanges: true - onFileChanged: { - this.reload() - delayedFileRead.start() - } - onLoadedChanged: { - const fileContent = themeFileView.text() - root.applyColors(fileContent) - } - } -}