feat: clear notifs shortcut
This commit is contained in:
parent
434e31d830
commit
391a02462c
2 changed files with 12 additions and 2 deletions
|
|
@ -142,7 +142,7 @@ StyledRect {
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
visible: !root.modelData?.appIcon.includes("symbolic")
|
visible: !root.modelData?.appIcon.endsWith("symbolic")
|
||||||
|
|
||||||
width: Math.round(parent.width * 0.6)
|
width: Math.round(parent.width * 0.6)
|
||||||
height: Math.round(parent.width * 0.6)
|
height: Math.round(parent.width * 0.6)
|
||||||
|
|
@ -155,7 +155,7 @@ StyledRect {
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: root.modelData?.appIcon.includes("symbolic") ?? false
|
active: root.modelData?.appIcon.endsWith("symbolic") ?? false
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
anchors.fill: icon
|
anchors.fill: icon
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
|
import "root:/widgets"
|
||||||
import "root:/config"
|
import "root:/config"
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Services.Notifications
|
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 {
|
component Notif: QtObject {
|
||||||
id: notif
|
id: notif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue