1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 15:02:50 -05:00

Add ability to disable loginctl lock integration

This commit is contained in:
bbedward
2025-10-09 14:58:16 -04:00
parent 242e05cc0e
commit a4ceeafb1e
3 changed files with 45 additions and 1 deletions

View File

@@ -61,6 +61,10 @@ Singleton {
detectHibernateProcess.running = true
detectPrimeRunProcess.running = true
console.log("SessionService: Native inhibitor available:", nativeInhibitorAvailable)
if (!SessionData.loginctlLockIntegration) {
console.log("SessionService: loginctl lock integration disabled by user")
return
}
if (socketPath && socketPath.length > 0) {
checkDMSCapabilities()
} else {
@@ -291,10 +295,29 @@ Singleton {
}
}
Connections {
target: SessionData
function onLoginctlLockIntegrationChanged() {
if (SessionData.loginctlLockIntegration) {
if (socketPath && socketPath.length > 0) {
checkDMSCapabilities()
} else {
initFallbackLoginctl()
}
} else {
subscriptionSocket.connected = false
lockStateMonitorFallback.running = false
loginctlAvailable = false
stateInitialized = false
}
}
}
DankSocket {
id: subscriptionSocket
path: root.socketPath
connected: loginctlAvailable
connected: loginctlAvailable && SessionData.loginctlLockIntegration
onConnectionStateChanged: {
root.subscriptionConnected = connected
@@ -342,6 +365,10 @@ Singleton {
return
}
if (!SessionData.loginctlLockIntegration) {
return
}
if (DMSService.capabilities.includes("loginctl")) {
loginctlAvailable = true
if (!stateInitialized) {