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