From 1a2b6524e64d6df0435305366fd43501b0791f5d Mon Sep 17 00:00:00 2001 From: purian23 Date: Wed, 11 Mar 2026 17:57:30 -0400 Subject: [PATCH] (processes): Add environment flag checks for fprintd and U2F availability --- quickshell/Common/settings/Processes.qml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/quickshell/Common/settings/Processes.qml b/quickshell/Common/settings/Processes.qml index 6700039c..6efe5816 100644 --- a/quickshell/Common/settings/Processes.qml +++ b/quickshell/Common/settings/Processes.qml @@ -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; }