1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-08 06:28:27 -04:00

powermenu: add soft reboot option for systemd systems

fixes #2986
port 1.5

(cherry picked from commit e089948225)
This commit is contained in:
bbedward
2026-08-04 18:04:19 -04:00
committed by dms-ci[bot]
parent 8cffdab4d7
commit c9c11f8a27
4 changed files with 49 additions and 9 deletions
+5
View File
@@ -17,6 +17,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"
@@ -452,6 +453,10 @@ Singleton {
}
}
function softReboot() {
Quickshell.execDetached(["systemctl", "soft-reboot"]);
}
function poweroff() {
if (SettingsData.customPowerActionPowerOff.length === 0) {
Quickshell.execDetached(powerManagerCommand("poweroff"));