diff options
author | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-02-04 20:52:20 +0530 |
---|---|---|
committer | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-02-04 20:52:20 +0530 |
commit | 9d6ac4fa8561f72127b1244d40533488fd1740cd (patch) | |
tree | 52657acf24c043a8096b165ccbddee57d5b0448f | |
download | ecosystem-9d6ac4fa8561f72127b1244d40533488fd1740cd.tar.gz ecosystem-9d6ac4fa8561f72127b1244d40533488fd1740cd.tar.bz2 ecosystem-9d6ac4fa8561f72127b1244d40533488fd1740cd.zip |
Fingerprint Lock system using phone
-rwxr-xr-x | unlock | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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 |