1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

idle: add lock before suspend to idle manager

This commit is contained in:
bbedward
2025-10-15 16:40:20 -04:00
parent 09a45b49a6
commit 4bc05e7083

View File

@@ -192,6 +192,14 @@ Singleton {
}
function suspend() {
if (SettingsData.lockBeforeSuspend) {
DMSService.lockSession(response => {
if (response.error) {
console.warn("Lock: Failed to call loginctl.lock:", response.error)
}
})
}
if (SettingsData.customPowerActionSuspend.length === 0) {
Quickshell.execDetached([isElogind ? "loginctl" : "systemctl", "suspend"])
} else {