diff options
Diffstat (limited to 'quickshell/shell.qml')
| -rw-r--r-- | quickshell/shell.qml | 66 |
1 files changed, 48 insertions, 18 deletions
diff --git a/quickshell/shell.qml b/quickshell/shell.qml index 307dece..f311380 100644 --- a/quickshell/shell.qml +++ b/quickshell/shell.qml @@ -25,25 +25,8 @@ ShellRoot { property int fontSize: 18 property bool appLauncherVisible: false + property bool calendarVisible: false - // focus: true - // Keys.onPressed: (event) => { - // if (event.key === Qt.Key_R && event.modifiers & Qt.MetaModifier) { - // Quickshell.execDetached(["notify-send", "ok"]) - // appLauncherVisible = true; - // } - // } - // Component.onCompleted: { - // Hyprland.rawSignals = true; - // } - // Connections { - // target: Hyprland - // - // function onEvent(sig) { - // Quickshell.execDetached(["notify-send", "ok"]) - // console.log("Raw = ", sig); - // } - // } GlobalShortcut { id: launcherShortcut name: "toggleLauncher" @@ -51,6 +34,13 @@ ShellRoot { appLauncherVisible = true } } + GlobalShortcut { + id: calendarShortcut + name: "toggleCalendar" + onPressed: { + calendarVisible = true + } + } Variants { model: Quickshell.screens @@ -197,4 +187,44 @@ ShellRoot { } } } + + Variants { + model: Quickshell.screens + + PanelWindow { + visible: shellRoot.calendarVisible + + anchors { + top: true + left: true + } + + margins { + top: 5 + left: Screen.width - 435 - 40 + } + + implicitWidth: 435 + implicitHeight: 370 + + color: "transparent" + exclusiveZone: 0 + + WlrLayershell.layer: WlrLayer.Overlay + WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand + + Behavior on height { + NumberAnimation { duration: 200; easing.type: Easing.OutCubic } + } + + Calendar { + anchors.fill: parent + isVisible: shellRoot.calendarVisible + + onRequestClose: { + shellRoot.calendarVisible = false + } + } + } + } } |
