View Single Post
Posts: 52 | Thanked: 33 times | Joined on Oct 2011 @ Poland, Tricity
#394
@MohammadAG Could you add proximity sensor toggle?

The script to do that is:
Code:
#
# Disable/enable proximity sensor
#
# To enable use: proximity_disable.sh 0
#
prox_enable_path=`find /sys/devices/ -name 'prox_enable'`

if [ -z "$1" ]; then
     echo "0" > $prox_enable_path
else
     echo "1" > $prox_enable_path
fi
Only problem is that it needs to be run as root, but I guess you have that covered in other toggles.