// Copyright (C) 2026 Danilo M. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. import Quickshell import Quickshell.Io import Quickshell.Wayland import "modules/appearance" import "modules/sound" ShellRoot { // Quickshell exits once no window is visible, and the drawer is closed // most of the time. See AGENTS.md. PanelWindow { visible: true implicitWidth: 1 implicitHeight: 1 color: "transparent" exclusionMode: ExclusionMode.Ignore mask: Region {} WlrLayershell.keyboardFocus: WlrKeyboardFocus.None } Drawer { id: drawer modules: [ SoundModule {}, AppearanceModule {}, ] } // The waybar launcher and the deep-link keybinds all reach this: // qs -p ipc call drawer toggle -> the grid // qs -p 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(); } } }