From aebda5dd12f6dc332f3e532a6766613926549351 Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 25 Mar 2026 21:08:36 +0100 Subject: [PATCH] push before continuing on pc --- #shell.qml# | 18 ++++++++++++ Colors.qml | 32 ++++++++++---------- modules/Bar/StatusIcons.qml | 7 +++-- modules/Bar/Ws.qml | 4 +-- modules/ipc/Ipc.qml | 6 ---- modules/notifications/Notification.qml | 2 +- modules/notifications/NotificationCard.qml | 34 +++++++++++++--------- modules/wallpaper/DesktopClock.qml | 8 ++--- modules/wallpaper/PlayerWidget.qml | 21 +++++++------ modules/wallpaper/Wallpaper.qml | 6 ++-- settings/settings.json | 8 ++--- shell.qml | 2 +- 12 files changed, 86 insertions(+), 62 deletions(-) create mode 100644 #shell.qml# diff --git a/#shell.qml# b/#shell.qml# new file mode 100644 index 0000000..f47d632 --- /dev/null +++ b/#shell.qml# @@ -0,0 +1,18 @@ +//@ pragma UseQApplication +import Quickshell +import QtQuick +import qs.modules.Bar +import qs.modules.ipc +import qs.modules.wallpaper +import qs.modules.widgets.wallpicker +import qs.modules.notifications + + +ShellRoot { + id: root + Bar {} + Ipc {} + Wallpaper {} + WallPicker {} + Notification {} +} diff --git a/Colors.qml b/Colors.qml index a1f6f8d..f2bb447 100644 --- a/Colors.qml +++ b/Colors.qml @@ -3,24 +3,24 @@ import QtQuick QtObject { // --- The Backgrounds (Darkest to Lightest) --- - readonly property string base00: "#1d2021" // Default Background - readonly property string base01: "#3c3836" // Lighter Background (Status bars, panels) - readonly property string base02: "#504945" // Selection Background - readonly property string base03: "#665c54" // Comments, Invisibles, line highlighting + readonly property string base00: "#0b0e14" // Default Background + readonly property string base01: "#131721" // Lighter Background (Status bars, panels) + readonly property string base02: "#202229" // Selection Background + readonly property string base03: "#3e4b59" // Comments, Invisibles, line highlighting // --- The Foregrounds (Darkest to Lightest) --- - readonly property string base04: "#bdae93" // Dark Foreground (Used for status bars) - readonly property string base05: "#d5c4a1" // Default Foreground, Caret - readonly property string base06: "#ebdbb2" // Light Foreground (Rarely used) - readonly property string base07: "#fbf1c7" // Lightest Foreground + readonly property string base04: "#bfbdb6" // Dark Foreground (Used for status bars) + readonly property string base05: "#e6e1cf" // Default Foreground, Caret + readonly property string base06: "#ece8db" // Light Foreground (Rarely used) + readonly property string base07: "#f2f0e7" // Lightest Foreground // --- The Accent Colors --- - readonly property string base08: "#fb4934" // Red (Variables, errors) - readonly property string base09: "#fe8019" // Orange (Integers, booleans, constants) - readonly property string base0A: "#fabd2f" // Yellow (Classes, search text bg, warnings) - readonly property string base0B: "#b8bb26" // Green (Strings, success states) - readonly property string base0C: "#8ec07c" // Cyan (Support, regex, escape chars) - readonly property string base0D: "#83a598" // Blue (Functions, methods, headings) - readonly property string base0E: "#d3869b" // Purple/Mauve (Keywords, storage, selectors) - readonly property string base0F: "#d65d0e" // Brown/Flamingo (Deprecated, embedded tags) + readonly property string base08: "#f07178" // Red (Variables, errors) + readonly property string base09: "#ff8f40" // Orange (Integers, booleans, constants) + readonly property string base0A: "#ffb454" // Yellow (Classes, search text bg, warnings) + readonly property string base0B: "#aad94c" // Green (Strings, success states) + readonly property string base0C: "#95e6cb" // Cyan (Support, regex, escape chars) + readonly property string base0D: "#59c2ff" // Blue (Functions, methods, headings) + readonly property string base0E: "#d2a6ff" // Purple/Mauve (Keywords, storage, selectors) + readonly property string base0F: "#e6b450" // Brown/Flamingo (Deprecated, embedded tags) } diff --git a/modules/Bar/StatusIcons.qml b/modules/Bar/StatusIcons.qml index 9116660..921e11f 100644 --- a/modules/Bar/StatusIcons.qml +++ b/modules/Bar/StatusIcons.qml @@ -25,9 +25,9 @@ WrapperRectangle { implicitWidth: iconLayout.implicitWidth + 14 implicitHeight: Settings.config.barHeight - margin * 2 radius: Settings.config.rounding - property var battery: UPower.displayDevice - property var percentage: UPower.displayDevice.percentage - property bool charging: UPower.displayDevice.state == UPowerDeviceState.Charging + property var battery: UPower.displayDevice.isLaptopBattery ? UPower.displayDevice : null + property var percentage: UPower.displayDevice.isLaptopBattery ? UPower.displayDevice.percentage : null + property bool charging: UPower.displayDevice.isLaptopBattery ? UPower.displayDevice.state == UPowerDeviceState.Charging : null property bool hasBattery: UPower.displayDevice.isLaptopBattery property var audio: Pipewire.ready ? Pipewire.defaultAudioSink : "" property var audioPercentage: Pipewire.ready ? Pipewire.defaultAudioSink.audio.volume : 0 @@ -87,6 +87,7 @@ WrapperRectangle { CIcon { id: batteryIcon Layout.leftMargin: 2 + visible: root.hasBattery text: root.getBatteryIcon() } CIcon { diff --git a/modules/Bar/Ws.qml b/modules/Bar/Ws.qml index f93745a..5a8e644 100644 --- a/modules/Bar/Ws.qml +++ b/modules/Bar/Ws.qml @@ -48,8 +48,8 @@ WrapperRectangle { id: wsText anchors.centerIn: parent text: wsRect.modelData.id - opacity: parent.modelData.focused ? 1 : 0.5 - color: parent.modelData.focused ? Colors.base00 : Colors.base07 + opacity: 1 + color: parent.modelData.focused ? Colors.base00 : Colors.base05 } Behavior on implicitWidth { NumberAnimation { diff --git a/modules/ipc/Ipc.qml b/modules/ipc/Ipc.qml index 15db824..02133c6 100644 --- a/modules/ipc/Ipc.qml +++ b/modules/ipc/Ipc.qml @@ -5,12 +5,6 @@ import qs import qs.settings Item { - IpcHandler { - target: "colors" - function reload() { - ThemeLoader.reload(); - } - } IpcHandler { target: "settings" function toggleWall() { diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml index e90faea..7cbd887 100644 --- a/modules/notifications/Notification.qml +++ b/modules/notifications/Notification.qml @@ -26,7 +26,7 @@ Variants { item: notifList } implicitHeight: notifList.contentHeight + 20 - implicitWidth: modelData.width / 8 + implicitWidth: modelData.width / 6 layer: WlrLayer.Overlay exclusionMode: ExclusionMode.Ignore diff --git a/modules/notifications/NotificationCard.qml b/modules/notifications/NotificationCard.qml index 5476129..e16dcd3 100644 --- a/modules/notifications/NotificationCard.qml +++ b/modules/notifications/NotificationCard.qml @@ -3,14 +3,13 @@ import qs.settings import QtQuick.Layouts import qs import Quickshell -import qs.modules.Bar import qs.widgets import Quickshell.Widgets Rectangle { id: notifyItem required property var modelData - implicitWidth: ListView.view ? ListView.view.width : 300 + implicitWidth: ListView.view ? ListView.view.width : 500 implicitHeight: fullLayout.implicitHeight + 40 color: dismissArea.containsMouse ? Colors.base02 : Colors.base00 radius: Settings.config.rounding @@ -20,9 +19,7 @@ Rectangle { id: dismissTimer interval: 5000 running: true - onTriggered: { - parent.modelData.expire(); - } + onTriggered: notifyItem.modelData.expire() } RowLayout { @@ -33,15 +30,16 @@ Rectangle { spacing: 10 ClippingWrapperRectangle { - id: notiIcon + id: notiIconWrapper + Layout.alignment: Qt.AlignTop radius: notifyItem.radius - notifyItem.radius / 3 - implicitWidth: 64 + implicitWidth: notiIcon.implicitSize color: "transparent" - implicitHeight: 64 - visible: notifyItem.modelData.appIcon !== "" + implicitHeight: notiIcon.implicitSize + visible: notifyItem.modelData.image !== "" IconImage { - source: Quickshell.iconPath(notifyItem.modelData.appIcon) - visible: notifyItem.modelData.image !== "" + id: notiIcon + source: notifyItem.modelData.image !== "" ? notifyItem.modelData.image : Quickshell.iconPath("preferences-desktop-notification-bell") implicitSize: 64 asynchronous: true } @@ -51,14 +49,23 @@ Rectangle { id: textLayout Layout.fillWidth: true Layout.alignment: Qt.AlignTop - spacing: 2 + spacing: 0 + CText { + id: appName + text: notifyItem.modelData.appName + opacity: 0.5 + font.pixelSize: 10 + } CText { id: summary text: notifyItem.modelData.summary font.bold: true elide: Text.ElideRight Layout.fillWidth: true + Layout.bottomMargin: 0 + Layout.topMargin: 5 + maximumLineCount: 1 onTextChanged: { dismissTimer.restart(); } @@ -67,7 +74,8 @@ Rectangle { CText { text: notifyItem.modelData.body font.pixelSize: Settings.config.fontSize - 2 - maximumLineCount: 2 + maximumLineCount: 1 + opacity: 0.3 wrapMode: Text.WordWrap elide: Text.ElideRight Layout.fillWidth: true diff --git a/modules/wallpaper/DesktopClock.qml b/modules/wallpaper/DesktopClock.qml index c6fd1d5..0bf6545 100644 --- a/modules/wallpaper/DesktopClock.qml +++ b/modules/wallpaper/DesktopClock.qml @@ -9,7 +9,7 @@ import qs.widgets Item { id: root - property int gaps: 30 + property int gaps: 10 implicitWidth: wrapper.width + gaps implicitHeight: wrapper.height + gaps ClippingWrapperRectangle { @@ -18,10 +18,10 @@ Item { enabled: true effect: DropShadow { color: "#111111" - horizontalOffset: 8 + horizontalOffset: 7 verticalOffset: 8 - radius: 8 - samples: 16 + radius: 12 + samples: 14 } } SystemClock { diff --git a/modules/wallpaper/PlayerWidget.qml b/modules/wallpaper/PlayerWidget.qml index 4fc2ba3..c89df82 100644 --- a/modules/wallpaper/PlayerWidget.qml +++ b/modules/wallpaper/PlayerWidget.qml @@ -12,7 +12,7 @@ import qs.widgets Rectangle { id: root color: Colors.base00 - radius: Settings.config.rounding * 1.5 + radius: Settings.config.rounding implicitWidth: 600 implicitHeight: 200 visible: getSpotify() != null @@ -20,10 +20,10 @@ Rectangle { enabled: true effect: DropShadow { color: "#111111" - horizontalOffset: 8 + horizontalOffset: 7 verticalOffset: 8 - radius: 8 - samples: 16 + radius: 12 + samples: 14 } } MouseArea { @@ -49,21 +49,22 @@ Rectangle { property var artist: getSpotify() != null ? getSpotify().trackArtist : "" ClippingWrapperRectangle { id: songWrapper - radius: Settings.config.rounding - anchors.margins: 10 + radius: Settings.config.rounding / 1.5 + anchors.margins: 8 margin: 0 anchors.fill: parent color: Colors.base00 RowLayout { id: songLayout + spacing: 10 ClippingWrapperRectangle { id: coverRounder Layout.fillWidth: true Layout.fillHeight: true Layout.maximumWidth: songCover.sourceSize.width - radius: Settings.config.rounding + radius: Settings.config.rounding / 1.5 Image { id: songCover source: root.art @@ -77,11 +78,12 @@ Rectangle { color: Colors.base01 Layout.fillWidth: true Layout.fillHeight: true - radius: Settings.config.rounding + Layout.alignment: Qt.AlignTop + radius: Settings.config.rounding / 1.5 margin: 20 child: ColumnLayout { id: songInfo - Layout.alignment: Qt.AlignVCenter + Layout.alignment: Qt.AlignTop Layout.fillWidth: true Layout.fillHeight: true Layout.leftMargin: 20 @@ -124,6 +126,7 @@ Rectangle { text: root.album + " - " + root.artist opacity: 0.6 Layout.maximumWidth: 250 + Layout.alignment: Qt.AlignTop elide: Text.ElideRight } ProgressBar { diff --git a/modules/wallpaper/Wallpaper.qml b/modules/wallpaper/Wallpaper.qml index e8e3380..ede5d0c 100644 --- a/modules/wallpaper/Wallpaper.qml +++ b/modules/wallpaper/Wallpaper.qml @@ -27,15 +27,15 @@ Variants { anchors { bottom: parent.bottom right: parent.right - margins: Settings.config.margins + 5 + margins: 25 } } PlayerWidget { anchors { top: parent.top left: parent.left - margins: Settings.config.margins + 5 - topMargin: Settings.config.margins + Settings.config.barHeight + 15 + margins: 35 + topMargin: Settings.config.barHeight + 35 + (Settings.config.floating ? Settings.config.margins : 0) } } } diff --git a/settings/settings.json b/settings/settings.json index 449d567..15eb9dd 100644 --- a/settings/settings.json +++ b/settings/settings.json @@ -2,10 +2,10 @@ "barHeight": 32, "barSpacing": 10, "barmargins": 6, - "currentWall": "/home/lucy/.walls/lance_of_longinus.png", - "floating": true, - "font": "Maple Mono", - "fontSize": 14, + "currentWall": "/home/lucy/.walls/mooon.png", + "floating": false, + "font": "Google Sans", + "fontSize": 13, "margins": 10, "rounding": 26, "wallswitchershown": false diff --git a/shell.qml b/shell.qml index bfc7255..8456156 100644 --- a/shell.qml +++ b/shell.qml @@ -9,8 +9,8 @@ import qs.modules.notifications ShellRoot { id: root - Bar {} Ipc {} + Bar {} Wallpaper {} WallPicker {} Notification {}