added pin file check
This commit is contained in:
parent
7eeecd9991
commit
709079c3e5
@ -24,6 +24,10 @@ lock_tg(){
|
||||
}
|
||||
|
||||
readpin(){
|
||||
if [[ ! -f ~/.local/.tgpin.txt ]]; then
|
||||
echo "Error: PIN file not found!"
|
||||
exit 1
|
||||
fi
|
||||
tgpin=$(cat ~/.local/.tgpin.txt)
|
||||
}
|
||||
|
||||
@ -37,9 +41,9 @@ if [ "$1" == "lock" ]; then
|
||||
lock_tg
|
||||
return_mouse
|
||||
elif [ "$1" == "unlock" ]; then
|
||||
readpin
|
||||
get_tg_window_id
|
||||
get_mouse_location
|
||||
readpin
|
||||
unlock_tg
|
||||
return_mouse
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user