powermenu actions to config
This commit is contained in:
parent
85acbba92d
commit
721cd85fec
3 changed files with 28 additions and 14 deletions
9
config/Config.qml
Normal file
9
config/Config.qml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property PowerMenu powermenu: PowerMenu {}
|
||||
}
|
||||
18
config/PowerMenu.qml
Normal file
18
config/PowerMenu.qml
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue