LG8n: rootdir: Improve init.gesture.sh to allow dt2w to be turned off

* may have to be adapted for every rom since not every rom uses the same dt2w settings key lol

Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
This commit is contained in:
Shirayuki39 2024-08-13 19:42:55 +08:00
parent a865a799ff
commit 9e8121393c

View file

@ -1,2 +1,12 @@
# Enable DT2W # Enable DT2W
echo cc1 > /proc/gesture_function while [[ -z $(getprop sys.boot_completed) ]]; do sleep 5; done
while true; do
dt2wstate=$(settings get secure double_tap_to_wake)
if [ "$dt2wstate" == "0" ]; then
echo cc2 > /proc/gesture_function
elif [ "$dt2wstate" == "1" ]; then
echo cc1 > /proc/gesture_function
fi
sleep 1
done