feat: add notification window with debug option

This commit is contained in:
Hannes
2026-08-29 01:19:21 +02:00
parent 8352ba5a56
commit 095839c45a
4 changed files with 111 additions and 27 deletions
+8 -15
View File
@@ -1,5 +1,6 @@
import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Services.Notifications
import "../../config"
import "./notificationServer"
@@ -30,7 +31,7 @@ PanelWindow {
if (!NotificationS.correctMonitor(screen))
return
if (NotificationS.correctMonitor(screen)) {
console.log("[Notification]: This notification belongs to me!", screen.x, screen.y)
console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: This notification belongs to me! ")
notificationListModel.append({notificationData: notification})
}
}
@@ -55,15 +56,17 @@ PanelWindow {
delegate: NotificationBody {
required property int index
required property var notificationData
screen: notificationWindow.screen
notification: notificationData
onDismissed: function(notification, dismiss) {
notificationListModel.remove(index)
if (dismiss) {
notification.dismiss()
}
console.log("[Notification]: Dismissed Notification:", notification.appName, notification.id, notification.summary, notification.body)
// if (dismiss) {
// notification.dismiss()
// console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: Dissmiss: " + notification.appName + " " + notification.id + " - " + notification.summary)
// }
console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: Close: " + notification.appName + " " + notification.id + " - " + notification.summary)
}
}
onItemAdded: updateContentSize()
@@ -92,14 +95,4 @@ PanelWindow {
contentHeight = height
console.log("[updateContentSize] contentWidth:", contentWidth, "contentHeight:", contentHeight)
}
Component.onCompleted: {
console.log(
"[Notification]:",
NotificationS,
"notification:",
NotificationS.newestNotification
)
}
}