x=$(cat /home/user/custom_brightness_settings) level1=40 level2=110 level3=160 level4=255 cx=$QBW_CLICK_X if [ $cx -ge 1 -a $cx -le 27 ];then x=$(expr $x - 20);fi if [ $cx -ge 28 -a $cx -le 54 ];then x=$level1;fi if [ $cx -ge 55 -a $cx -le 81 ];then x=$level2;fi if [ $cx -ge 82 -a $cx -le 108 ];then x=$level3;fi if [ $cx -ge 108 -a $cx -le 135 ];then x=$level4;fi if [ $cx -ge 136 -a $cx -le 162 ];then x=$(expr $x + 20);fi if [ $x -le 2 ];then x=2;fi if [ $x -ge 255 ];then x=255;fi echo $x " " echo $x >/home/user/custom_brightness_settings echo "cat /home/user/custom_brightness_settings >/sys/class/backlight/acx565akm/brightness" | sudo gainroot > /dev/null