lux-shell/services/Notifications.qml
2025-07-24 14:02:11 -04:00

25 lines
526 B
QML

pragma Singleton
import Quickshell
import Quickshell.Services.Notifications
Singleton {
id: root
property bool hasNotifications: notifications.length > 0
property list<Notification> notifications: []
function clear() {
notifications.forEach(notification => {
notification.dismiss();
});
notifications = [];
}
NotificationServer {
onNotification: event => {
event.tracked = true;
root.notifications.push(event);
}
}
}