24 lines
511 B
QML
24 lines
511 B
QML
pragma Singleton
|
|
|
|
import Quickshell
|
|
import Quickshell.Services.Notifications
|
|
|
|
Singleton {
|
|
readonly property list<Notification> notifications: server.trackedNotifications.values
|
|
readonly property int amountNotifications: notifications.length
|
|
|
|
function dismissAll() {
|
|
for (let i = notifications.length - 1; i >= 0; i--) {
|
|
notifications[i].dismiss();
|
|
}
|
|
}
|
|
|
|
NotificationServer {
|
|
id: server
|
|
actionsSupported: true
|
|
|
|
onNotification: notif => {
|
|
notif.tracked = true;
|
|
}
|
|
}
|
|
} |