feat: Introduce NotificationHistoryLoader to manage opening and closing the NotificationHistory panel.

This commit is contained in:
Hannes
2026-09-01 22:41:34 +02:00
parent 94d9dd6fac
commit 9788529f55
7 changed files with 372 additions and 9 deletions
@@ -0,0 +1,50 @@
import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import "../../config"
import "./notificationServer"
Item { // container, invisible
id: nHistoryLoader
LazyLoader {
id: notifificationHistoryLoader
// active: true
active: false
NotificationHistory {
id: nHistory
function closeNHistory() {
nHistoryLoader.closeNHistory()
}
}
}
GlobalShortcut {
name: "NotificationHistory"
description: "Open Notification History"
onPressed: {
console.log("Pressed Meta+Shift+N (Hyprland global shortcut)")
notifificationHistoryLoader.active = !notifificationHistoryLoader.active
}
}
function openNHistory() {
notifificationHistoryLoader.active = true
}
function closeNHistory() {
notifificationHistoryLoader.active = false
}
function toggleNHistory() {
notifificationHistoryLoader.active = !notifificationHistoryLoader.active
}
Component.onCompleted: {
console.log("[NotificationHistoryLoader]:", NotificationS)
}
}