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

12
migrations/1762684663.sh Normal file
View File

@@ -0,0 +1,12 @@
echo "Update hyprlock font to match current system font"
font_name=$(omarchy-font-current)
if [[ -n "$font_name" ]]; then
cp ~/.config/hypr/hyprlock.conf ~/.config/hypr/hyprlock.conf.bak.$(date +%s)
echo "Found font '$font_name', updating hyprlock"
sed -i "s/font_family = .*/font_family = $font_name/g" ~/.config/hypr/hyprlock.conf
else
echo "No font found, skipping migration"
fi

12
migrations/1762685081.sh Normal file
View File

@@ -0,0 +1,12 @@
echo "Update hyprlock placeholder text based on fingerprint setup status"
cp ~/.config/hypr/hyprlock.conf ~/.config/hypr/hyprlock.conf.bak.$(date +%s)
# Check if fprintd is installed and has enrolled fingerprints
if command -v fprintd-list &>/dev/null && fprintd-list "$USER" 2>/dev/null | grep -q "Fingerprints for user"; then
echo "Fingerprint detected, updating placeholder text with fingerprint icon"
sed -i 's/placeholder_text = .*/placeholder_text = <span> Enter Password 󰈷 <\/span>/' ~/.config/hypr/hyprlock.conf
else
echo "No fingerprint enrolled, updating placeholder text without fingerprint icon"
sed -i 's/placeholder_text = .*/placeholder_text = Enter Password/' ~/.config/hypr/hyprlock.conf
fi