diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-04 19:59:36 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-04 19:59:36 +1000 |
| commit | 391a02462cbb48ff6683479d2ca241334bd6e307 (patch) | |
| tree | aa28c3ee6f7ed28a7a175f737ed581d712e2549f | |
| parent | internal: use panelwindow (diff) | |
| download | caelestia-shell-391a02462cbb48ff6683479d2ca241334bd6e307.tar.gz caelestia-shell-391a02462cbb48ff6683479d2ca241334bd6e307.tar.bz2 caelestia-shell-391a02462cbb48ff6683479d2ca241334bd6e307.zip | |
feat: clear notifs shortcut
| -rw-r--r-- | modules/notifications/Notification.qml | 4 | ||||
| -rw-r--r-- | services/Notifs.qml | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml index 039b519..c91111d 100644 --- a/modules/notifications/Notification.qml +++ b/modules/notifications/Notification.qml @@ -142,7 +142,7 @@ StyledRect { asynchronous: true anchors.centerIn: parent - visible: !root.modelData?.appIcon.includes("symbolic") + visible: !root.modelData?.appIcon.endsWith("symbolic") width: Math.round(parent.width * 0.6) height: Math.round(parent.width * 0.6) @@ -155,7 +155,7 @@ StyledRect { } Loader { - active: root.modelData?.appIcon.includes("symbolic") ?? false + active: root.modelData?.appIcon.endsWith("symbolic") ?? false asynchronous: true anchors.fill: icon diff --git a/services/Notifs.qml b/services/Notifs.qml index d81b90d..b4ebc26 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -1,6 +1,7 @@ pragma Singleton pragma ComponentBehavior: Bound +import "root:/widgets" import "root:/config" import Quickshell import Quickshell.Services.Notifications @@ -32,6 +33,15 @@ Singleton { } } + CustomShortcut { + name: "clearNotifs" + description: "Clear all notifications" + onPressed: { + for (const notif of root.list) + notif.popup = false; + } + } + component Notif: QtObject { id: notif |