Complete OWE service setup and lock feed fallback

This commit is contained in:
David Heinemeier Hansson committed 2026-09-20 20:36:19 -05:00
1 parent b0bf4876b1
commit b423f4993d
14 files changed
+289 -43

No files matched your search

+29
View File
@@ -28,6 +28,7 @@ Item {
property string failureMessage: ""
property int failedAttempts: 0
property string backgroundPath: ""
property string videoPosterPath: ""
property int backgroundVersion: 0
property string lastEvent: "init"
property string lastEventAt: ""
@@ -113,6 +114,16 @@ Item {
if (!readlinkProc.running) readlinkProc.running = true
}
function refreshPoster() {
if (!root.videoBackground) {
root.videoPosterPath = ""
return
}
if (posterProc.running) return
posterProc.sourcePath = root.backgroundPath
posterProc.running = true
}
function refreshFingerprintStatus() {
if (!fingerprintCheckProc.running) fingerprintCheckProc.running = true
}
@@ -307,6 +318,7 @@ Item {
id: lockView
anchors.fill: parent
backgroundPath: root.backgroundPath
videoPosterPath: root.videoPosterPath
backgroundVersion: root.backgroundVersion
fingerprintConfigured: root.fingerprintConfigured
authenticatingPassword: root.authenticatingPassword
@@ -339,6 +351,7 @@ Item {
LockView {
anchors.fill: parent
backgroundPath: root.backgroundPath
videoPosterPath: root.videoPosterPath
backgroundVersion: root.backgroundVersion
fingerprintConfigured: root.fingerprintConfigured
authenticatingPassword: false
@@ -409,9 +422,25 @@ Item {
onStreamFinished: {
var next = String(text || "").trim()
if (next !== root.backgroundPath) {
root.videoPosterPath = ""
root.backgroundPath = next
root.backgroundVersion += 1
}
root.refreshPoster()
}
}
}
Process {
id: posterProc
property string sourcePath: ""
command: ["bash", Quickshell.env("OMARCHY_PATH") + "/shell/plugins/lock/poster.sh", sourcePath]
stdout: StdioCollector { id: posterOutput; waitForEnd: true }
onExited: function(exitCode) {
if (sourcePath !== root.backgroundPath) {
root.refreshPoster()
} else {
root.videoPosterPath = exitCode === 0 ? String(posterOutput.text || "").trim() : ""
}
}
}