android_device_tecno_LG8n/rootdir/bin/init.gesture.sh
Shirayuki39 9e8121393c 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>
2024-08-13 19:42:55 +08:00

13 lines
324 B
Bash

# Enable DT2W
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