Skip to content

Commit

Permalink
lock.sh: fingerprint support
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan <29968201+Nathan13888@users.noreply.github.com>
  • Loading branch information
Nathan13888 committed Sep 5, 2024
1 parent f633382 commit 6169702
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/lock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ if grep closed /proc/acpi/button/lid/*/state; then
$HOME/scripts/backlight.sh disable

# lock screen
set -euo pipefail
(
until fprintd-verify; do
echo "Failed to verify fingerprint at $(date)" | systemd-cat
done

echo "Unlocked at $(date)" | systemd-cat
pkill -USR1 hyprlock
) &
hyprlock
kill $(jobs -p)
pkill fprintd-verify

#if [[ `hyprctl monitors | grep "Monitor" | wc -l` != 1 ]]; then
# TODO: auto detect monitor at ID 0
Expand Down

0 comments on commit 6169702

Please sign in to comment.