1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

(processes): Add environment flag checks for fprintd and U2F availability

This commit is contained in:
purian23
2026-03-11 17:57:30 -04:00
parent 95c4aa9e4c
commit 1a2b6524e6

View File

@@ -10,15 +10,39 @@ Singleton {
property var settingsRoot: null
function envFlag(name) {
const value = (Quickshell.env(name) || "").trim().toLowerCase();
if (value === "1" || value === "true" || value === "yes" || value === "on")
return true;
if (value === "0" || value === "false" || value === "no" || value === "off")
return false;
return null;
}
readonly property var forcedFprintAvailable: envFlag("DMS_FORCE_FPRINT_AVAILABLE")
readonly property var forcedU2fAvailable: envFlag("DMS_FORCE_U2F_AVAILABLE")
function detectQtTools() {
qtToolsDetectionProcess.running = true;
}
function detectFprintd() {
if (!settingsRoot)
return;
if (forcedFprintAvailable !== null) {
settingsRoot.fprintdAvailable = forcedFprintAvailable;
return;
}
fprintdDetectionProcess.running = true;
}
function detectU2f() {
if (!settingsRoot)
return;
if (forcedU2fAvailable !== null) {
settingsRoot.u2fAvailable = forcedU2fAvailable;
return;
}
u2fDetectionProcess.running = true;
}