feat: add NotificationOverview and NotificationOverviewLoader for notification history overview {alpha}
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import "./notificationServer"
|
||||
|
||||
Item {
|
||||
id: overviewLoaderRoot
|
||||
|
||||
// Per-screen PanelWindows for the overview.
|
||||
// Uses Loader so windows are only created when overviewVisible is true.
|
||||
Repeater {
|
||||
model: Quickshell.screens
|
||||
delegate: Loader {
|
||||
id: screenLoader
|
||||
required property var modelData
|
||||
active: NotificationS.overviewVisible
|
||||
sourceComponent: NotificationOverview {
|
||||
screen: modelData
|
||||
}
|
||||
// optional: hide on screen removed
|
||||
onActiveChanged: {
|
||||
if (active) {
|
||||
console.log("[NotificationOverviewLoader] opening overview on screen", Hyprland.monitorFor(modelData).activeWorkspace.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Global shortcut to toggle overview (optional)
|
||||
GlobalShortcut {
|
||||
name: "NotificationOverview"
|
||||
description: "Toggle notification history overview"
|
||||
onPressed: {
|
||||
NotificationS.toggleOverview()
|
||||
console.log("[NotificationOverviewLoader] shortcut toggle, now", NotificationS.overviewVisible)
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("[NotificationOverviewLoader] completed, overviewVisible:", NotificationS.overviewVisible)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user