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

lock: bypass custom commands in ipc

This commit is contained in:
bbedward
2025-10-19 23:15:32 -04:00
parent daf3525e80
commit 0cb081a6d0
2 changed files with 16 additions and 7 deletions

View File

@@ -20,7 +20,7 @@ Scope {
function lock() {
if (SettingsData.customPowerActionLock && SettingsData.customPowerActionLock.length > 0) {
Quickshell.execDetached(SettingsData.customPowerActionLock.split(" "))
Quickshell.execDetached(["sh", "-c", SettingsData.customPowerActionLock])
return
}
if (!processingExternalEvent && SettingsData.loginctlLockIntegration && DMSService.isConnected) {
@@ -110,7 +110,16 @@ Scope {
target: "lock"
function lock() {
root.lock()
if (!root.processingExternalEvent && SettingsData.loginctlLockIntegration && DMSService.isConnected) {
DMSService.lockSession(response => {
if (response.error) {
console.warn("Lock: Failed to call loginctl.lock:", response.error)
root.shouldLock = true
}
})
} else {
root.shouldLock = true
}
}
function demo() {