Add CompositorService, make Logger look a bit nicer

This commit is contained in:
Ly-sec 2025-08-17 10:19:51 +02:00
parent c991ac85b4
commit 05f9acdc5d
9 changed files with 473 additions and 297 deletions

View file

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