id | grep root || sudo $0
NUMBER=`cat /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale`
if [ $NUMBER = 0.100000 ]
then
echo turning off
echo 6.4 > /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale
else
echo turning on
echo 0.1 > /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale
fi
works for me under manjaro phosh, YMMV
if it doesnt work see if that "iio\:device2" became device 1 or 0 or ...
is there an easy way to tie this to an icon?
NUMBER=`cat /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale`
if [ $NUMBER = 0.100000 ]
then
echo turning off
echo 6.4 > /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale
else
echo turning on
echo 0.1 > /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale
fi
works for me under manjaro phosh, YMMV
if it doesnt work see if that "iio\:device2" became device 1 or 0 or ...
is there an easy way to tie this to an icon?