aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/Drawer.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/Drawer.qml')
-rw-r--r--desktop/Drawer.qml26
1 files changed, 20 insertions, 6 deletions
diff --git a/desktop/Drawer.qml b/desktop/Drawer.qml
index 4ed37d3..79a5393 100644
--- a/desktop/Drawer.qml
+++ b/desktop/Drawer.qml
@@ -10,6 +10,7 @@
// GNU General Public License for more details.
import Quickshell
+import Quickshell.Io
import Quickshell.Wayland
import QtQuick
@@ -29,6 +30,20 @@ Scope {
// Which module's page is showing. Empty means the grid.
property string page: ""
+ // Set by NotificationList's History button. Task 5 reads this to show the
+ // history view; nothing consumes it yet.
+ property bool history: false
+
+ // The balloons read this to stand down while the drawer holds the space.
+ FileView {
+ id: drawerFlag
+ path: (Quickshell.env("XDG_RUNTIME_DIR") || "/tmp") + "/notifyd/drawer"
+ atomicWrites: true
+ printErrors: false
+ }
+
+ onOpenChanged: drawerFlag.setText(root.open ? "1\n" : "0\n")
+
readonly property var screenObj:
Quickshell.screens.find(s => s.name === root.monitor) ?? Quickshell.screens[0]
@@ -123,16 +138,15 @@ Scope {
anchors.margins: 16
visible: root.page === ""
- // Reserved for the notification engine. An empty Item that
- // claims the space rather than a placeholder graphic: the
- // grid has to sit where it will sit once notifications
- // arrive, or the layout is tuned against a position that
- // does not survive.
- Item {
+ // The notification engine's space. The live queue lists
+ // here while the drawer is open; the balloons stand down
+ // because the drawer flag above is set.
+ NotificationList {
id: notifications
anchors { top: parent.top; left: parent.left; right: parent.right }
anchors.bottom: grid.top
anchors.bottomMargin: 16
+ onHistory: root.history = true
}
// Fixed, never scrolled. Three columns at 600px with a