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