Ensure hyprlock only looks for a fingerprint auth when that's configured

This should eradicate the first failed auth attempt after
sleep/hibernation
This commit is contained in:
David Heinemeier Hansson
2026-02-06 11:24:12 +01:00
parent c268fb6c9b
commit bd8b12b23b
3 changed files with 8 additions and 1 deletions

View File

@@ -58,11 +58,13 @@ EOF
add_hyprlock_fingerprint_icon() { add_hyprlock_fingerprint_icon() {
print_info "Adding fingerprint icon to hyprlock placeholder text..." print_info "Adding fingerprint icon to hyprlock placeholder text..."
sed -i 's/placeholder_text = .*/placeholder_text = <span> Enter Password 󰈷 <\/span>/' ~/.config/hypr/hyprlock.conf sed -i 's/placeholder_text = .*/placeholder_text = <span> Enter Password 󰈷 <\/span>/' ~/.config/hypr/hyprlock.conf
sed -i 's/fingerprint:enabled = .*/fingerprint:enabled = true/' ~/.config/hypr/hyprlock.conf
} }
remove_hyprlock_fingerprint_icon() { remove_hyprlock_fingerprint_icon() {
print_info "Removing fingerprint icon from hyprlock placeholder text..." print_info "Removing fingerprint icon from hyprlock placeholder text..."
sed -i 's/placeholder_text = .*/placeholder_text = Enter Password/' ~/.config/hypr/hyprlock.conf sed -i 's/placeholder_text = .*/placeholder_text = Enter Password/' ~/.config/hypr/hyprlock.conf
sed -i 's/fingerprint:enabled = .*/fingerprint:enabled = false/' ~/.config/hypr/hyprlock.conf
} }
remove_pam_config() { remove_pam_config() {

View File

@@ -39,5 +39,5 @@ input-field {
} }
auth { auth {
fingerprint:enabled = true fingerprint:enabled = false
} }

5
migrations/1770372978.sh Normal file
View File

@@ -0,0 +1,5 @@
# Disable fingerprint in hyprlock if fingerprint auth is not configured
if omarchy-cmd-missing fprintd-list || ! fprintd-list "$USER" 2>/dev/null | grep -q "finger"; then
sed -i 's/fingerprint:enabled = .*/fingerprint:enabled = false/' ~/.config/hypr/hyprlock.conf
fi