mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
SessionMenu: improve compatibility with non-systemd distros.
This commit is contained in:
@@ -329,17 +329,17 @@ Singleton {
|
||||
|
||||
function shutdown() {
|
||||
Logger.i("Compositor", "Shutdown requested")
|
||||
Quickshell.execDetached(["systemctl", "poweroff"])
|
||||
Quickshell.execDetached(["sh", "-c", "systemctl poweroff || loginctl poweroff"])
|
||||
}
|
||||
|
||||
function reboot() {
|
||||
Logger.i("Compositor", "Reboot requested")
|
||||
Quickshell.execDetached(["systemctl", "reboot"])
|
||||
Quickshell.execDetached(["sh", "-c", "systemctl reboot || loginctl reboot"])
|
||||
}
|
||||
|
||||
function suspend() {
|
||||
Logger.i("Compositor", "Suspend requested")
|
||||
Quickshell.execDetached(["systemctl", "suspend"])
|
||||
Quickshell.execDetached(["sh", "-c", "systemctl suspend || loginctl suspend"])
|
||||
}
|
||||
|
||||
function lockAndSuspend() {
|
||||
|
||||
Reference in New Issue
Block a user