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:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user