2025-07-04 15:05:07 -07:00
#!/bin/bash
2025-07-09 16:26:22 -07:00
yay -S --noconfirm --needed fprintd libfprint
2025-07-04 15:05:07 -07:00
2025-07-09 16:26:22 -07:00
# Add fingerprint authentication as a sufficient option
grep -q 'pam_fprintd.so' /etc/pam.d/system-auth ||
sudo sed -i '/^auth.*pam_unix.so/ i auth sufficient pam_fprintd.so' /etc/pam.d/system-auth
2025-07-09 19:31:26 -04:00
systemctl --user restart hyprpolkitagent
2025-07-09 16:26:22 -07:00
# Enroll the first finger
2025-07-04 15:05:07 -07:00
echo -e "\e[32m\nLet's setup your right index finger as the first fingerprint.\nKeep moving the finger around on sensor until the process completes.\n\e[0m"
2025-07-09 16:26:22 -07:00
sudo fprintd-enroll $USER
2025-07-04 15:05:07 -07:00
echo -e "\e[32m\nNow let's verify that it's working correctly.\e[0m\n"
if fprintd-verify; then
echo -e "\e[32m\nPerfect! Now you can use your fingerprint on the lock screen (Super + Escape).\e[0m"
else
echo -e "\e[31m\nSomething went wrong. Maybe try again?\e[0m"
fi