-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fprint: Add terminal based app for finger print.
For user finger print enrollment add terminal based app which will take finger input to enroll finger based authenication in the system. Works fine across system reboot as well. Signed-off-by: Vunny Sodhi <[email protected]>
- Loading branch information
Showing
5 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# | ||
{ | ||
writeShellApplication, | ||
util-linux, | ||
fprintd, | ||
}: | ||
writeShellApplication { | ||
name = "finger-print-enroll"; | ||
runtimeInputs = [ | ||
util-linux | ||
fprintd | ||
]; | ||
text = builtins.readFile ./enroll.sh; | ||
meta = { | ||
description = "Helper script for finger print enrollment"; | ||
platforms = [ | ||
"x86_64-linux" | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#! /usr/bin/env bash | ||
# shellcheck shell=bash | ||
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Notes: | ||
# Thi script can be used enroll finger print | ||
set +xo pipefail | ||
mainmenu () { | ||
echo "Please choose which finger you want to enroll" | ||
echo "0. Right Thumb" | ||
echo "1. Right Index Finger" | ||
echo "2. Right Middle Finger" | ||
echo "3. Right Ring Finger" | ||
echo "4. Right Little Finger" | ||
echo "5. Left Thumb" | ||
echo "6. Left Index Finger" | ||
echo "7. Left Middle Finger" | ||
echo "8. Left Ring Finger" | ||
echo "9. Left Little Finger" | ||
echo "" | ||
} | ||
readfunc() | ||
{ | ||
while true; do | ||
read -r -n 1 -p "Input Selection:" mainmenuinput | ||
echo "" | ||
echo "Please tap on power button for finger enrollment" | ||
echo "" | ||
if [ "$mainmenuinput" = "0" ]; then | ||
fprintd-enroll -f right-thumb | ||
elif [ "$mainmenuinput" = "1" ]; then | ||
fprintd-enroll -f right-index-finger | ||
elif [ "$mainmenuinput" = "2" ]; then | ||
fprintd-enroll -f right-middle-finger | ||
elif [ "$mainmenuinput" = "3" ]; then | ||
fprintd-enroll -f right-ring-finger | ||
elif [ "$mainmenuinput" = "4" ]; then | ||
fprintd-enroll -f right-little-finger | ||
elif [ "$mainmenuinput" = "5" ];then | ||
fprintd-enroll -f left-thumb | ||
elif [ "$mainmenuinput" = "6" ];then | ||
fprintd-enroll -f left-index-finger | ||
elif [ "$mainmenuinput" = "7" ];then | ||
fprintd-enroll -f left-middle-finger | ||
elif [ "$mainmenuinput" = "8" ];then | ||
fprintd-enroll -f left-ring-finger | ||
elif [ "$mainmenuinput" = "9" ];then | ||
fprintd-enroll -f left-ring-finger | ||
else | ||
echo "Invalid Input" | ||
mainmenu | ||
readfunc | ||
fi | ||
echo "" | ||
exit 0 | ||
done | ||
} | ||
mainmenu | ||
readfunc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
}: | ||
let | ||
icons = [ | ||
"authy.svg" | ||
"bluetooth-48.svg" | ||
"preferences-sound.svg" | ||
"chromium.svg" | ||
|