diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-15 14:37:21 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-15 14:37:21 +0200 |
| commit | bf4b1ec622122a713f975731839f430756823202 (patch) | |
| tree | 5c822a64faaa2a76b4dafae4397a1c3070ed57ff /desktop/Drawer.qml | |
| parent | fe1c0524c87118b1171c6549c68d7fbb701c61ab (diff) | |
| download | quickshell-bf4b1ec622122a713f975731839f430756823202.tar.gz quickshell-bf4b1ec622122a713f975731839f430756823202.zip | |
feat(desktop): fill the drawer's notification space
The reserved Item becomes the live queue with a History button, scrollable
because the queue can hold 20. The drawer writes notifyd/drawer so the
balloon shell stands down while this space is showing, which is what stops a
notification appearing twice.
Diffstat (limited to 'desktop/Drawer.qml')
| -rw-r--r-- | desktop/Drawer.qml | 26 |
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 |
