powermenu actions to config

This commit is contained in:
Benjamin Palko 2025-08-28 10:40:54 -04:00
parent 85acbba92d
commit 721cd85fec
3 changed files with 28 additions and 14 deletions

9
config/Config.qml Normal file
View file

@ -0,0 +1,9 @@
pragma Singleton
import Quickshell
Singleton {
id: root
readonly property PowerMenu powermenu: PowerMenu {}
}

18
config/PowerMenu.qml Normal file
View file

@ -0,0 +1,18 @@
import Quickshell
PersistentProperties {
property list<var> actions: [
{
text: "󰍃 Logout",
command: "hyprctl dispatch exit"
},
{
text: "󰜉 Reboot",
command: "systemctl reboot"
},
{
text: " Shutdown",
command: "systemctl poweroff"
}
]
}

View file

@ -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