From 57b5e8e2ef23b387fed885e50c734c8250f398cc Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Fri, 28 Nov 2025 15:56:46 +0100 Subject: [PATCH] added CustomShortcut to powermenu and launcher --- launcher/Launcher.qml | 9 +++++---- launcher/Powermenu.qml | 16 +++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/launcher/Launcher.qml b/launcher/Launcher.qml index 98dfaba..0e517c4 100644 --- a/launcher/Launcher.qml +++ b/launcher/Launcher.qml @@ -5,6 +5,7 @@ import QtQuick.Controls import Quickshell.Wayland import Quickshell.Io import "root:/singeltons" +import "root:/utils" PanelWindow { id: root @@ -20,10 +21,10 @@ PanelWindow { WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive WlrLayershell.layer: WlrLayer.Top - IpcHandler { - target: "launcher" - - function open(): void {root.show = true; } + CustomShortcut { + name: "openLauncher" + description: "Open launcher" + onPressed: {root.show = true; } } // Main window diff --git a/launcher/Powermenu.qml b/launcher/Powermenu.qml index 46fce08..e98989d 100644 --- a/launcher/Powermenu.qml +++ b/launcher/Powermenu.qml @@ -5,6 +5,7 @@ import QtQuick.Controls import Quickshell.Wayland import Quickshell.Io import "root:/singeltons" +import "root:/utils" PanelWindow { id: root @@ -23,17 +24,10 @@ PanelWindow { WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive WlrLayershell.layer: WlrLayer.Top - IpcHandler { - target: "powermenu" - - function open(): void { - root.selectedIndex = 0 - root.show = true - } - - function close(): void { - root.show = false - } + CustomShortcut { + name: "openPowermenu" + description: "Open powermenu" + onPressed: {root.show = true; } } function executeButton(index){