notification button

This commit is contained in:
Benjamin Palko 2025-07-24 14:02:11 -04:00
parent e964ee2337
commit 65b4762c90
5 changed files with 86 additions and 3 deletions

View file

@ -0,0 +1,25 @@
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);
}
}
}