Bring the fingerprint affordance to the Quickshell lock screen and polkit dialog, matching what hyprlock did on master. Lock screen: render the md-fingerprint glyph inside the password field's right edge when a sensor is enrolled, reserving space so long passwords never run under it. Polkit dialog: show one method at a time. When a sensor is enrolled and the reader is reachable, the dialog is just the centered fingerprint icon (square card); the moment PAM asks for a password it switches to the password field. Detects pam_fprintd anywhere in the auth stack now that a gate can precede it. Lid awareness: a closed lid means the reader is unreachable, so both surfaces fall back to the password. polkit gets a pam_exec clamshell gate (auth [success=1 default=ignore] before pam_fprintd) so a shut lid drops straight to the password prompt instead of blocking on the reader for the pam_fprintd timeout; the lock screen hides the icon and skips scanning. The gate points at the fixed /usr/bin path the package always provides so it survives switching between package installs and dev-link. A migration adds the gate for existing fingerprint setups. New helper omarchy-hw-laptop-closed (pure lid state); omarchy-hw-clamshell now composes it with the external-monitor check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
40 lines
1.2 KiB
Bash
Executable File
40 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Remove fingerprint authentication from sudo, polkit, and lock screen
|
|
# omarchy:requires-sudo=true
|
|
|
|
set -e
|
|
|
|
|
|
remove_pam_config() {
|
|
# Remove from sudo
|
|
if grep -q pam_fprintd.so /etc/pam.d/sudo; then
|
|
echo "Removing fingerprint authentication from sudo..."
|
|
sudo sed -i '/pam_fprintd\.so/d' /etc/pam.d/sudo
|
|
fi
|
|
|
|
# Remove from polkit (both the fingerprint module and its clamshell gate)
|
|
if [[ -f /etc/pam.d/polkit-1 ]] && grep -Eq 'pam_fprintd\.so|omarchy-hw-laptop-closed' /etc/pam.d/polkit-1; then
|
|
echo "Removing fingerprint authentication from polkit..."
|
|
sudo sed -i -e '/pam_fprintd\.so/d' -e '/omarchy-hw-laptop-closed/d' /etc/pam.d/polkit-1
|
|
fi
|
|
}
|
|
|
|
remove_lock_fingerprint_pam() {
|
|
if [[ -f /etc/pam.d/omarchy-lock-fingerprint ]]; then
|
|
echo "Removing lock screen fingerprint authentication..."
|
|
sudo rm -f /etc/pam.d/omarchy-lock-fingerprint
|
|
fi
|
|
}
|
|
|
|
|
|
echo -e "\e[32mRemoving fingerprint scanner from authentication.\n\e[0m"
|
|
|
|
remove_pam_config
|
|
remove_lock_fingerprint_pam
|
|
|
|
echo "Removing fingerprint packages..."
|
|
omarchy-pkg-drop fprintd libfprint-git
|
|
|
|
echo -e "\e[32mFingerprint authentication has been completely removed.\e[0m"
|