1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-05 13:08:29 -04:00

powermenu: add soft reboot option for systemd systems

fixes #2986
port 1.5
This commit is contained in:
bbedward
2026-08-04 18:04:19 -04:00
parent 7f2ba56e06
commit e089948225
4 changed files with 49 additions and 9 deletions
+5
View File
@@ -19,6 +19,7 @@ Singleton {
property bool loginctlCommandAvailable: false
property bool systemctlCommandAvailable: false
property bool hibernateSupported: false
readonly property bool softRebootSupported: systemctlCommandAvailable
property bool inhibitorAvailable: true
property bool idleInhibited: false
property string inhibitReason: "Keep system awake"
@@ -470,6 +471,10 @@ Singleton {
}
}
function softReboot() {
Quickshell.execDetached(["systemctl", "soft-reboot"]);
}
function poweroff() {
if (SettingsData.customPowerActionPowerOff.length === 0) {
Quickshell.execDetached(powerManagerCommand("poweroff"));