Dynamically set hyprlock font and placeholder text (#3281)

This commit is contained in:
Mitch Lombardi
2025-11-10 02:51:49 -05:00
committed by GitHub
parent 3a744e0f78
commit a304b32cc1
5 changed files with 43 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ if [[ -n "$font_name" && "$font_name" != "CNCLD" ]]; then
pkill -SIGUSR2 ghostty
fi
sed -i "s/font_family = .*/font_family = $font_name/g" ~/.config/hypr/hyprlock.conf
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/waybar/style.css
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/swayosd/style.css
xmlstarlet ed -L \

View File

@@ -51,6 +51,16 @@ EOF
fi
}
add_hyprlock_fingerprint_icon() {
print_info "Adding fingerprint icon to hyprlock placeholder text..."
sed -i 's/placeholder_text = .*/placeholder_text = <span> Enter Password 󰈷 <\/span>/' ~/.config/hypr/hyprlock.conf
}
remove_hyprlock_fingerprint_icon() {
print_info "Removing fingerprint icon from hyprlock placeholder text..."
sed -i 's/placeholder_text = .*/placeholder_text = Enter Password/' ~/.config/hypr/hyprlock.conf
}
remove_pam_config() {
# Remove from sudo
if grep -q pam_fprintd.so /etc/pam.d/sudo; then
@@ -71,6 +81,9 @@ if [[ "--remove" == "$1" ]]; then
# Remove PAM configuration
remove_pam_config
# Remove fingerprint icon from hyprlock placeholder text
remove_hyprlock_fingerprint_icon
# Uninstall packages
print_info "Removing fingerprint packages..."
sudo pacman -Rns --noconfirm fprintd
@@ -90,6 +103,9 @@ else
# Configure PAM
setup_pam_config
# Add fingerprint icon to hyprlock placeholder text
add_hyprlock_fingerprint_icon
# Enroll first fingerprint
print_success "\nLet's setup your right index finger as the first fingerprint."
print_info "Keep moving the finger around on sensor until the process completes.\n"