publish: the public projection begins here
This is a projection, not a development branch. The tree above was constructed from the internal source named below under a manifest that decides which paths may leave, then scanned as a whole tree rather than as a series of patches, and only then published. Public history starts here because the history before it was not admissible, and neither was the tree. What used to stand in this repository included a rescue copy of another machine, a directory of phone handoffs, deployment wired to one house, and a submodule pointing at a forge no stranger can reach. None of that was ever the product. It stays in the private forge, which is allowed to hold the whole working organism, and this is what was deliberately sent out instead. Three mechanisms produced this tree, in decreasing order of trust. A top-level path the manifest does not name never arrives at all, which is the one that catches directories nobody has thought of yet. Named internal files inside admitted roots are dropped. A short, reviewed table replaces deployment defaults that a public build must not carry -- an endpoint aimed at one LAN, a VPN profile belonging to one phone, packaging built from one checkout path. Everything after this commit is an ordinary publication with the same three trailers, so a force push stops being routine and starts meaning that something deliberate happened. The trailers bind the projection to its source without pretending the public SHA is the private one: same lineage, different tree, and the record says so. Source-Sha: 8f27b1e76a8fef560a336aba18e6990713ff1047 Policy-Sha: 6b261d2f3e6e1fb19874846ba4bb1dfe15565d25b8618c1c1afba0419c101d27 Tree-Digest: 18ec3563c5e5ef9a414993a9f6734b251ff9ed3cd56eebdd6cac01e45c6e3067
This commit is contained in:
commit
8f42fc953d
1476 changed files with 238455 additions and 0 deletions
140
surfaces/quickshell/services/FingerprintPreview.qml
Normal file
140
surfaces/quickshell/services/FingerprintPreview.qml
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
// One owner for the temporary FPC1020 interaction path.
|
||||
//
|
||||
// The privileged reader daemon publishes only an IRQ pulse. Until the
|
||||
// match-on-chip daemon exists, a user-visible hold is the configured temporary
|
||||
// confirmation. The Polkit surface may submit the configured temporary PAM
|
||||
// factor after a completed hold; it is never a lock-screen unlock path.
|
||||
pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.modules.common
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property bool previewEnabled:
|
||||
(Config.options && Config.options.lock && Config.options.lock.fingerprintPreview
|
||||
&& Config.options.lock.fingerprintPreview.enabled) ?? false
|
||||
readonly property bool polkitEnabled:
|
||||
(Config.options && Config.options.lock && Config.options.lock.fingerprintPolkit
|
||||
&& Config.options.lock.fingerprintPolkit.enabled) ?? true
|
||||
readonly property bool enabled: previewEnabled || polkitEnabled
|
||||
readonly property int holdMs:
|
||||
(Config.options && Config.options.lock && Config.options.lock.fingerprintPreview
|
||||
&& Config.options.lock.fingerprintPreview.holdMs) ?? 3000
|
||||
property bool holding: false
|
||||
property bool confirmed: false
|
||||
property bool pulseSeen: false
|
||||
property real holdProgress: 0
|
||||
property double holdStartedAt: 0
|
||||
property string activePurpose: ""
|
||||
property string confirmedPurpose: ""
|
||||
property string pulseToken: ""
|
||||
|
||||
signal pulseObserved()
|
||||
signal holdConfirmed(string purpose)
|
||||
|
||||
function beginHold(purpose) {
|
||||
if (!root.enabled || !purpose) return false;
|
||||
root.confirmed = false;
|
||||
root.confirmedPurpose = "";
|
||||
root.activePurpose = purpose;
|
||||
root.holding = true;
|
||||
root.holdStartedAt = Date.now();
|
||||
root.holdProgress = 0;
|
||||
holdTimer.start();
|
||||
return true;
|
||||
}
|
||||
|
||||
function cancelHold(purpose = "") {
|
||||
if (purpose && root.activePurpose !== purpose) return;
|
||||
root.holding = false;
|
||||
root.holdProgress = 0;
|
||||
root.activePurpose = "";
|
||||
holdTimer.stop();
|
||||
}
|
||||
|
||||
function confirmHold(purpose = "") {
|
||||
if (!root.holding || (purpose && root.activePurpose !== purpose)) return;
|
||||
const confirmedPurpose = root.activePurpose;
|
||||
root.holding = false;
|
||||
root.holdProgress = 1;
|
||||
root.activePurpose = "";
|
||||
holdTimer.stop();
|
||||
root.confirmed = true;
|
||||
root.confirmedPurpose = confirmedPurpose;
|
||||
root.holdConfirmed(confirmedPurpose);
|
||||
confirmTimer.restart();
|
||||
}
|
||||
|
||||
// The diagnostic IPC and the reader file meet here. Neither can unlock a
|
||||
// session; Polkit alone may use the explicit temporary confirmation path.
|
||||
function notePulse() {
|
||||
if (!root.enabled)
|
||||
return { ok: false, code: "not_enabled", reason: "fingerprint preview is disabled" };
|
||||
root.pulseSeen = true;
|
||||
root.pulseObserved();
|
||||
pulseTimer.restart();
|
||||
return { ok: true, status: "observed" };
|
||||
}
|
||||
|
||||
function reset(purpose = "") {
|
||||
if (purpose && root.activePurpose !== purpose && root.confirmedPurpose !== purpose)
|
||||
return;
|
||||
root.cancelHold();
|
||||
root.confirmed = false;
|
||||
root.confirmedPurpose = "";
|
||||
root.pulseSeen = false;
|
||||
confirmTimer.stop();
|
||||
pulseTimer.stop();
|
||||
}
|
||||
|
||||
FileView {
|
||||
id: pulseFile
|
||||
path: "/run/blueline-fingerprintd/preview-pulse"
|
||||
watchChanges: true
|
||||
printErrors: false
|
||||
onFileChanged: reload()
|
||||
onLoaded: {
|
||||
try {
|
||||
const record = JSON.parse(pulseFile.text());
|
||||
const token = `${record.sequence}:${record.at_ms}`;
|
||||
if (token === root.pulseToken) return;
|
||||
root.pulseToken = token;
|
||||
const ageMs = Date.now() - Number(record.at_ms);
|
||||
if (Number(record.sequence) > 0 && ageMs >= 0 && ageMs < 5000)
|
||||
root.notePulse();
|
||||
} catch (error) {
|
||||
console.warn("[fingerprint-preview] invalid FPC pulse record:", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: holdTimer
|
||||
interval: 50
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
const elapsed = Date.now() - root.holdStartedAt;
|
||||
root.holdProgress = Math.min(1, elapsed / Math.max(1, root.holdMs));
|
||||
if (root.holdProgress >= 1) root.confirmHold();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: confirmTimer
|
||||
interval: 3500
|
||||
onTriggered: {
|
||||
root.confirmed = false;
|
||||
root.confirmedPurpose = "";
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: pulseTimer
|
||||
interval: 3500
|
||||
onTriggered: root.pulseSeen = false
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue