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

Merge branch 'master' of github.com:bbedward/DankMaterialShell into notif-work

This commit is contained in:
bbedward
2025-08-12 11:05:25 -04:00
2 changed files with 53 additions and 5 deletions

View File

@@ -13,6 +13,35 @@ Item {
loader.activeAsync = true
}
function checkLockedOnStartup() {
lockStateChecker.running = true
}
Component.onCompleted: {
checkLockedOnStartup()
}
Process {
id: lockStateChecker
command: ["sh", "-c", "loginctl show-session $(loginctl list-sessions --no-legend | awk '{print $1}' | head -1) --property=LockedHint"]
running: false
onExited: (exitCode, exitStatus) => {
if (exitCode !== 0) {
console.warn("Failed to check session lock state, exit code:", exitCode)
}
}
stdout: StdioCollector {
onStreamFinished: {
if (text.trim() === "LockedHint=yes") {
console.log("Session is locked on startup, activating lock screen")
loader.activeAsync = true
}
}
}
}
LazyLoader {
id: loader