diff options
Diffstat (limited to 'quickshell/shell.qml')
| -rw-r--r-- | quickshell/shell.qml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/quickshell/shell.qml b/quickshell/shell.qml new file mode 100644 index 0000000..6e9ca84 --- /dev/null +++ b/quickshell/shell.qml @@ -0,0 +1,63 @@ +//@ pragma UseQApplication + +import QtQuick +import QtQuick.Layouts +import Quickshell +import Quickshell.Io +import Quickshell.Wayland +import Niri +import "./modules/bar/" +import "./modules/desktop/" +import "./modules/notifications/" + +ShellRoot { + id: root + + Niri { + id: niri + Component.onCompleted: connect() + + onConnected: console.info("Connected to niri") + onErrorOccurred: function(error) { + console.error("Niri error:", error) + } + } + + LazyLoader { + id: wallLoader + active: true + component: Wallpaper {} + } + + Timer { + id: wallTimer + interval: 100 + onTriggered: wallLoader.active = true + } + + Variants { + id: barVariants + + model: Quickshell.screens.filter(s => s.name === "HDMI-A-1") + + Bar {} + } + + IpcHandler { + target: "shell" + + function restartBar(): void { + for (const b of barVariants.instances) + b.restart() + } + + function restartWall(): void { + Quickshell.reload(false) + } + } + + LazyLoader { + active: true + component: Notifications {} + } +} |
