Files
quickshell/modules/notification/NotificationOverviewLoader.qml
T

42 lines
1.3 KiB
QML

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)
}
}