From 1d96e74bb67c848d46ec8d34d43a45d59b1b1cdf Mon Sep 17 00:00:00 2001 From: lucy Date: Tue, 9 Jun 2026 11:36:43 +0200 Subject: [PATCH] revert dwm styling, just use dwm instead --- modules/bar/Bat.qml | 24 ++--- modules/bar/Mpris.qml | 2 +- modules/bar/Pw.qml | 9 +- modules/notifications/NotiCard.qml | 160 ++++++++++++++--------------- widgets/MaterialIcon.qml | 10 +- 5 files changed, 96 insertions(+), 109 deletions(-) diff --git a/modules/bar/Bat.qml b/modules/bar/Bat.qml index b215c41..8b341b6 100644 --- a/modules/bar/Bat.qml +++ b/modules/bar/Bat.qml @@ -18,26 +18,20 @@ Rectangle { implicitHeight: moduleHeight implicitWidth: batLayout.implicitWidth + 16 radius: Config.rounding - function batteryIcon(percent, charging) { - if (percent <= 15) - return charging ? "battery_charging_20" : "battery_alert"; - if (percent <= 30) - return charging ? "battery_charging_30" : "battery_2_bar"; - if (percent <= 50) - return charging ? "battery_charging_50" : "battery_3_bar"; - if (percent <= 70) - return charging ? "battery_charging_60" : "battery_4_bar"; - if (percent <= 85) - return charging ? "battery_charging_80" : "battery_5_bar"; - if (percent <= 95) - return charging ? "battery_charging_90" : "battery_6_bar"; - return charging ? "battery_charging_full" : "battery_full"; + function batteryIcon() { + if (root.charging) { return "\uea33"; } + else if(root.percent <= 20) { return "\uea34" } + else if(root.percent <= 40) { return "\uea2f" } + else if(root.percent <= 60) { return "\uea30" } + else if(root.percent <= 80) { return "\uea31" } + else if(root.percent >= 80) { return "\uea32" } } + RowLayout { id: batLayout anchors.centerIn: root MaterialIcon { - text: root.batteryIcon(root.percent, root.charging) + text: root.batteryIcon() } StyledText { text: Math.floor(root.percent) + "%" diff --git a/modules/bar/Mpris.qml b/modules/bar/Mpris.qml index 02026e6..fb32221 100644 --- a/modules/bar/Mpris.qml +++ b/modules/bar/Mpris.qml @@ -26,7 +26,7 @@ Rectangle { id: songLayout anchors.centerIn: root MaterialIcon { - text: "music_note_2" + text: "\ueafc" } StyledText { Layout.maximumWidth: 400 diff --git a/modules/bar/Pw.qml b/modules/bar/Pw.qml index c073b31..b64d07a 100644 --- a/modules/bar/Pw.qml +++ b/modules/bar/Pw.qml @@ -18,18 +18,19 @@ Rectangle { function getVolumeIcon() { let volume = Pipewire.ready ? root.defaultAudio.audio.volume : null; if (root.mute) { - return "\ue04f"; + return "\uf1c3"; } if (volume <= 0.33) { - return "\ue04e"; + return "\u1019d"; } if (volume <= 0.66) { - return "\ue04d"; + return "\ueb4f"; } if (volume >= 0.66) { - return "\ue050"; + return "\ueb51"; } } + PwObjectTracker { objects: [Pipewire.ready ? Pipewire.defaultAudioSink : null] } diff --git a/modules/notifications/NotiCard.qml b/modules/notifications/NotiCard.qml index 0b0cad2..7be1b30 100644 --- a/modules/notifications/NotiCard.qml +++ b/modules/notifications/NotiCard.qml @@ -7,86 +7,86 @@ import qs.settings import qs.widgets WrapperRectangle { - id: root - required property var notification - required property ShellScreen nScreen - implicitWidth: nScreen.width / 6 - implicitHeight: 100 - radius: Config.rounding - anchors.right: parent?.right - color: Colors.base01 - clip: true - Timer { - id: dismissTimer - running: true - interval: 5000 - repeat: false - onTriggered: root.notification?.dismiss() + id: root + required property var notification + required property ShellScreen nScreen + implicitWidth: nScreen.width / 6 + implicitHeight: 100 + radius: Config.rounding + anchors.right: parent?.right + color: Colors.base01 + clip: true + Timer { + id: dismissTimer + running: true + interval: 5000 + repeat: false + onTriggered: root.notification?.dismiss() + } + child: WrapperMouseArea { + id: mouseHandler + child: RowLayout { + spacing: 10 + IconImage { + id: appIcon + Layout.leftMargin: 8 + visible: root.notification?.image ? true : false + source: root.notification?.image ? root.notification.image : '' + implicitSize: 64 + } + ColumnLayout { + Layout.alignment: Qt.AlignLeft + Layout.fillWidth: true + Layout.preferredWidth: 0 + Layout.fillHeight: true + Layout.leftMargin: appIcon.visible ? 0 : 16 + RowLayout { + Layout.alignment: Qt.AlignTop + MaterialIcon { + text: "\uea35" + font.pixelSize: 12 + } + StyledText { + id: appId + text: root.notification?.appName ? root.notification.appName : '' + opacity: 0.4 + } + } + ColumnLayout { + spacing: 0 + Layout.rightMargin: 40 + StyledText { + id: title + Layout.bottomMargin: 0 + Layout.topMargin: 5 + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true + text: root.notification?.summary == null ? '' : root.notification.summary + elide: Text.ElideRight + } + StyledText { + id: body + Layout.alignment: Qt.AlignBottom + text: root.notification?.body ? root.notification.body : '' + elide: Text.ElideRight + maximumLineCount: 1 + Layout.fillWidth: true + opacity: 0.6 + } + } + } } - child: WrapperMouseArea { - id: mouseHandler - child: RowLayout { - spacing: 10 - IconImage { - id: appIcon - Layout.leftMargin: 8 - visible: root.notification?.image ? true : false - source: root.notification?.image ? root.notification.image : '' - implicitSize: 64 - } - ColumnLayout { - Layout.alignment: Qt.AlignLeft - Layout.fillWidth: true - Layout.preferredWidth: 0 - Layout.fillHeight: true - Layout.leftMargin: appIcon.visible ? 0 : 16 - RowLayout { - Layout.alignment: Qt.AlignTop - MaterialIcon { - text: "\ue7f4" - font.pixelSize: 12 - } - StyledText { - id: appId - text: root.notification?.appName ? root.notification.appName : '' - opacity: 0.4 - } - } - ColumnLayout { - spacing: 0 - Layout.rightMargin: 40 - StyledText { - id: title - Layout.bottomMargin: 0 - Layout.topMargin: 5 - Layout.alignment: Qt.AlignBottom - Layout.fillWidth: true - text: root.notification?.summary == null ? '' : root.notification.summary - elide: Text.ElideRight - } - StyledText { - id: body - Layout.alignment: Qt.AlignBottom - text: root.notification?.body ? root.notification.body : '' - elide: Text.ElideRight - maximumLineCount: 1 - Layout.fillWidth: true - opacity: 0.6 - } - } - } - } - acceptedButtons: Qt.LeftButton - cursorShape: Qt.PointingHandCursor - hoverEnabled: true - onEntered: { - root.color = Colors.base03; - } - onExited: { - root.color = Colors.base01; - } - onClicked: { - root.notification ? root.notification.dismiss() : ''; - } + acceptedButtons: Qt.LeftButton + cursorShape: Qt.PointingHandCursor + hoverEnabled: true + onEntered: { + root.color = Colors.base03; } + onExited: { + root.color = Colors.base01; + } + onClicked: { + root.notification ? root.notification.dismiss() : ''; + } + } } diff --git a/widgets/MaterialIcon.qml b/widgets/MaterialIcon.qml index 66c3e38..75e5bba 100644 --- a/widgets/MaterialIcon.qml +++ b/widgets/MaterialIcon.qml @@ -3,15 +3,7 @@ import qs.settings import QtQuick Text { - font.family: "Material Symbols Rounded" + font.family: "tabler-icons" color: Colors.base07 font.pixelSize: Config.iconSize - property bool fill: false - renderType: Text.NativeRendering - font.variableAxes: { - "FILL": fill ? 1 : 0, - "opsz": 24, - "wght": 400, - "GRAD": 24 - } }