aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/shell.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/shell.qml')
-rw-r--r--desktop/shell.qml27
1 files changed, 23 insertions, 4 deletions
diff --git a/desktop/shell.qml b/desktop/shell.qml
index abddf36..ed219e5 100644
--- a/desktop/shell.qml
+++ b/desktop/shell.qml
@@ -10,13 +10,12 @@
// GNU General Public License for more details.
import Quickshell
+import Quickshell.Io
import Quickshell.Wayland
ShellRoot {
- // Quickshell exits once no window is visible, and this shell's drawer is
- // closed most of the time. A 1x1 transparent window with an empty mask
- // holds the process open without drawing anything or catching a click.
- // See AGENTS.md: without it the shell loads, reports no error, and quits.
+ // Quickshell exits once no window is visible, and the drawer is closed
+ // most of the time. See AGENTS.md.
PanelWindow {
visible: true
implicitWidth: 1
@@ -26,4 +25,24 @@ ShellRoot {
mask: Region {}
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
}
+
+ Drawer {
+ id: drawer
+ modules: []
+ }
+
+ // The waybar launcher and the deep-link keybinds all reach this:
+ // qs -p <this dir> ipc call drawer toggle -> the grid
+ // qs -p <this dir> ipc call drawer open mail -> the mail page
+ // Quickshell 0.3.1 IPC requires every declared argument to be present,
+ // and a parameter with a JS default registers as QVariant, which IPC
+ // rejects. So the page name cannot be optional: `open` always takes a
+ // page, and the page-less grid is `toggle`, the zero-argument shape the
+ // appearance shell uses for its routes and the waybar launcher calls.
+ IpcHandler {
+ target: "drawer"
+ function open(page: string) { drawer.show(page); }
+ function toggle() { drawer.toggle(""); }
+ function close() { drawer.close(); }
+ }
}