Add CompositorService, make Logger look a bit nicer
This commit is contained in:
parent
c991ac85b4
commit
05f9acdc5d
9 changed files with 473 additions and 297 deletions
|
|
@ -348,13 +348,7 @@ NPanel {
|
|||
// ----------------------------------
|
||||
// System functions
|
||||
function logout() {
|
||||
if (WorkspacesService.isNiri) {
|
||||
logoutProcessNiri.running = true
|
||||
} else if (WorkspacesService.isHyprland) {
|
||||
logoutProcessHyprland.running = true
|
||||
} else {
|
||||
Logger.warn("PowerMenu", "No supported compositor detected for logout")
|
||||
}
|
||||
CompositorService.logout()
|
||||
}
|
||||
|
||||
function suspend() {
|
||||
|
|
@ -390,19 +384,7 @@ NPanel {
|
|||
running: false
|
||||
}
|
||||
|
||||
Process {
|
||||
id: logoutProcessNiri
|
||||
|
||||
command: ["niri", "msg", "action", "quit", "--skip-confirmation"]
|
||||
running: false
|
||||
}
|
||||
|
||||
Process {
|
||||
id: logoutProcessHyprland
|
||||
|
||||
command: ["hyprctl", "dispatch", "exit"]
|
||||
running: false
|
||||
}
|
||||
|
||||
Process {
|
||||
id: logoutProcess
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue