mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-28 12:49:25 +00:00
Add --remove option to fingerprint setup
This commit is contained in:
@ -1,10 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
yay -S --noconfirm --needed fprintd usbutils
|
if [[ "--remove" == "$1" ]]; then
|
||||||
|
yay -Rns --noconfirm fprintd
|
||||||
if ! lsusb | grep -Eiq 'fingerprint|synaptics|goodix'; then
|
sudo rm -rf /etc/pam.d/polkit-1
|
||||||
echo -e "\e[31m\nNo fingerprint sensor detected.\e[0m"
|
sudo sed -i '/pam_fprintd\.so/d' /etc/pam.d/sudo
|
||||||
|
echo -e "\e[32mYou've successfully removed the fingerprint setup.\e[0m"
|
||||||
else
|
else
|
||||||
|
yay -S --noconfirm --needed fprintd usbutils
|
||||||
|
|
||||||
|
if ! lsusb | grep -Eiq 'fingerprint|synaptics|goodix'; then
|
||||||
|
echo -e "\e[31m\nNo fingerprint sensor detected.\e[0m"
|
||||||
|
else
|
||||||
# Add fingerprint authentication as an option for sudo
|
# Add fingerprint authentication as an option for sudo
|
||||||
if ! grep -q pam_fprintd.so /etc/pam.d/sudo; then
|
if ! grep -q pam_fprintd.so /etc/pam.d/sudo; then
|
||||||
sudo sed -i '1i auth sufficient pam_fprintd.so' /etc/pam.d/sudo
|
sudo sed -i '1i auth sufficient pam_fprintd.so' /etc/pam.d/sudo
|
||||||
@ -33,4 +39,5 @@ EOF
|
|||||||
else
|
else
|
||||||
echo -e "\e[31m\nSomething went wrong. Maybe try again?\e[0m"
|
echo -e "\e[31m\nSomething went wrong. Maybe try again?\e[0m"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user