From 9d6ac4fa8561f72127b1244d40533488fd1740cd Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Sun, 4 Feb 2024 20:52:20 +0530 Subject: Fingerprint Lock system using phone --- unlock | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 unlock diff --git a/unlock b/unlock new file mode 100755 index 0000000..0ed851f --- /dev/null +++ b/unlock @@ -0,0 +1,17 @@ +#!/data/data/com.termux/files/usr/bin/bash +#Dependecies: termux-api, openssh, jq + +toast() { + termux-toast -g bottem -b black $1 +} + +# Try to unlock +FINGERPRINT=$(termux-fingerprint | jq -r '.fingerprints[0].fingerprint') +if ( "$FINGERPRINT"); then + ssh pc "pkill slock" + toast "Success" +else + toast "Failed" +fi + +exit 0 -- cgit v1.2.3-59-g8ed1b