feat: clear notifs shortcut

This commit is contained in:
2 * r + 2 * t 2025-06-04 19:59:36 +10:00
parent 434e31d830
commit 391a02462c
2 changed files with 12 additions and 2 deletions

View file

@ -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

View file

@ -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