diff options
| author | coasteen <coasteen@proton.me> | 2026-07-09 10:46:52 +0330 |
|---|---|---|
| committer | coasteen <coasteen@proton.me> | 2026-07-09 10:46:52 +0330 |
| commit | a3008666c6c75ff61b1fc329b4d962a6c367d5f0 (patch) | |
| tree | a203a54b3c61884ea13957cf18284f6c83f8e64d /home-configuration/config/quickshell | |
Diffstat (limited to 'home-configuration/config/quickshell')
| -rw-r--r-- | home-configuration/config/quickshell/config.js | 22 | ||||
| -rw-r--r-- | home-configuration/config/quickshell/shell.qml | 124 |
2 files changed, 146 insertions, 0 deletions
diff --git a/home-configuration/config/quickshell/config.js b/home-configuration/config/quickshell/config.js new file mode 100644 index 0000000..0983a40 --- /dev/null +++ b/home-configuration/config/quickshell/config.js @@ -0,0 +1,22 @@ +const colors = { + bg: "#1a1b26", + bgDark: "#16161a", + fg: "#cdd6f4", + muted: "#444b6a", + cyan: "#d3869b", + purple: "#cba6f7", + red: "#f38ba8", + yellow: "#e0af68", + blue: "#89b4fa", +} +const bar = { + fontFamily: "Iosevka Nerd Font", + fontSize: 14, + height: 44, +} +const notifications = { + timeout: 5000, +} +const wallpaper = { + wallpaper: "file:///home/coast/Wallpapers/nature2art.png" +} diff --git a/home-configuration/config/quickshell/shell.qml b/home-configuration/config/quickshell/shell.qml new file mode 100644 index 0000000..a1356b1 --- /dev/null +++ b/home-configuration/config/quickshell/shell.qml @@ -0,0 +1,124 @@ +import Quickshell +import Quickshell.Wayland +import Quickshell.Services.Notifications +import QtQuick +import QtQuick.Layouts + +import "config.js" as Config + +Scope { + id: root + + NotificationServer { + id: server + actionsSupported: true + bodySupported: true + imageSupported: true + + onNotification: n => { + n.tracked = true + } + } + + PanelWindow { + anchors { top: true; right: true } + margins { top: 56; right: 12 } + + implicitWidth: 380 + implicitHeight: Math.max(1, column.implicitHeight) + color: "transparent" + exclusionMode: ExclusionMode.Ignore + + ColumnLayout { + id: column + width: parent.width + spacing: 10 + + Repeater { + model: server.trackedNotifications + + delegate: Rectangle { + id: card + required property var modelData + + Timer { + running: card.modelData.urgency !== NotificationUrgency.Critical + interval: Config.notifications.timeout + repeat: false + onTriggered: card.modelData.dismiss() + } + + Layout.fillWidth: true + implicitHeight: layout.implicitHeight + 20 + + radius: 12 + color: Config.colors.bgDark + + Rectangle { + anchors.left: parent.left + anchors.top: parent.top + anchors.bottom: parent.bottom + width: 4 + radius: 12 + color: card.modelData.urgency === NotificationUrgency.Critical + ? Config.colors.red + : Config.colors.purple + } + + RowLayout { + id: layout + anchors.fill: parent + anchors.margins: 10 + anchors.leftMargin: 18 + spacing: 10 + + Image { + Layout.preferredWidth: 36 + Layout.preferredHeight: 36 + Layout.alignment: Qt.AlignTop + fillMode: Image.PreserveAspectFit + visible: source.toString() !== "" + source: card.modelData.image || card.modelData.appIcon || "" + } + + ColumnLayout { + Layout.fillWidth: true + spacing: 2 + + Text { + Layout.fillWidth: true + text: card.modelData.summary + color: Config.colors.cyan + + font.family: Config.bar.fontFamily + font.pixelSize: Config.bar.fontSize + font.bold: true + + elide: Text.ElideRight + } + + Text { + Layout.fillWidth: true + visible: text !== "" + text: card.modelData.body + color: Config.colors.fg + + font.family: Config.bar.fontFamily + font.pixelSize: Config.bar.fontSize - 1 + + wrapMode: Text.WordWrap + } + } + } + + MouseArea { + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: card.modelData.dismiss() + } + } + } + } + } +} |
