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