diff options
| -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 |