notifications working (totally) perfectly

This commit is contained in:
2026-06-16 22:01:15 +01:00
parent 23407ea36b
commit 603da98035
9 changed files with 598 additions and 79 deletions

View File

@@ -0,0 +1,31 @@
pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Services.Notifications
Singleton {
id: root
property alias notif: server
function getLatestNotification() {
let notificationList = server.trackedNotifications.values;
let len = notificationList.length;
if (len <= 0) {
len = 1;
}
let latestNotification = notificationList[len - 1];
return latestNotification;
}
NotificationServer {
id: server
bodyMarkupSupported: true
bodySupported: true
onNotification: notification => {
notification.tracked = true;
}
}
}