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