From 721cd85fec30401baa70b820dc8d37d27105059d Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Thu, 28 Aug 2025 10:40:54 -0400 Subject: [PATCH] powermenu actions to config --- config/Config.qml | 9 +++++++++ config/PowerMenu.qml | 18 ++++++++++++++++++ modules/powermenu/PowerMenu.qml | 15 +-------------- 3 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 config/Config.qml create mode 100644 config/PowerMenu.qml diff --git a/config/Config.qml b/config/Config.qml new file mode 100644 index 0000000..2cd8ea0 --- /dev/null +++ b/config/Config.qml @@ -0,0 +1,9 @@ +pragma Singleton + +import Quickshell + +Singleton { + id: root + + readonly property PowerMenu powermenu: PowerMenu {} +} diff --git a/config/PowerMenu.qml b/config/PowerMenu.qml new file mode 100644 index 0000000..0046bd9 --- /dev/null +++ b/config/PowerMenu.qml @@ -0,0 +1,18 @@ +import Quickshell + +PersistentProperties { + property list actions: [ + { + text: "󰍃 Logout", + command: "hyprctl dispatch exit" + }, + { + text: "󰜉 Reboot", + command: "systemctl reboot" + }, + { + text: " Shutdown", + command: "systemctl poweroff" + } + ] +} diff --git a/modules/powermenu/PowerMenu.qml b/modules/powermenu/PowerMenu.qml index ab131e3..69b423b 100644 --- a/modules/powermenu/PowerMenu.qml +++ b/modules/powermenu/PowerMenu.qml @@ -67,20 +67,7 @@ StyledWindow { list.incrementCurrentIndex(); } - model: [ - { - text: "󰍃 Logout", - command: "hyprctl dispatch exit" - }, - { - text: "󰜉 Reboot", - command: "systemctl reboot" - }, - { - text: " Shutdown", - command: "systemctl poweroff" - } - ] + model: Config.powermenu.actions spacing: 8