- "nub0thres")
- curthres=$(cat /proc/pandora/nub0/mbutton_threshold)
- newthres=$(zenity --scale --text "Change the mousebutton sensitivity for the left nub.\nThe default value is 20.\nThe higher the value the higher you need to move the nub" --min-value=1 --max-value=40 --value=$curthres --step 1)
- echo $newthres > /proc/pandora/nub0/mbutton_threshold
- ;;
-
- "nub1mode")
- if nubm=$(zenity --height=300 --list --title="Select Nub-mode for the right nub" --text="Please select the modus for the right nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves." --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "mbuttons" "Use the nub for mousebuttons" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick") ; then
+ "nub0thres")
+ curthres=$(cat /proc/pandora/nub0/mbutton_threshold)
+ newthres=$(zenity --scale --text "Change the mousebutton sensitivity for the left nub.\nThe default value is 20.\nThe higher the value the higher you need to move the nub" --min-value=1 --max-value=40 --value=$curthres --step 1)
+ echo $newthres > /proc/pandora/nub0/mbutton_threshold
+ ;;
+
+ "nub0reset")
+ echo 1 > /sys/bus/i2c/drivers/vsense/3-0066/reset
+ sleep 1
+ echo 0 > /sys/bus/i2c/drivers/vsense/3-0066/reset
+ curmode=$(cat /proc/pandora/nub0/mode)
+ echo mouse > /proc/pandora/nub0/mode
+ while ! zenity --question --title="Resetted left nub" --text="The left nub has been resetted.\nPlease try to move the mouse cursor\nto test if it is working properly." --ok-label="Working properly" --cancel-label="Reset again"; do
+ echo 1 > /sys/bus/i2c/drivers/vsense/3-0066/reset
+ sleep 1
+ echo 0 > /sys/bus/i2c/drivers/vsense/3-0066/reset
+ done
+ echo curmode > /proc/pandora/nub0/mode
+ ;;
+ esac
+ done
+ ;;
+
+ "rightnub")
+
+ while rightsel=$(zenity --title="Configure Right Nub" --width="430" --height="300" --list --column "id" --column "Please select" --hide-column=1 --text="What do you want to do?" "nub1mode" "Change Nub mode" "nub1msense" "Change the mouse speed" "nub1ssense" "Change the scroll sensitivity" "nub1rate" "Change the scroll speed" "nub1thres" "Change the mouse button sensitivity" "nub1reset" "Reset Nub"); do
+ case $rightsel in
+
+ "nub1mode")
+ if nubm=$(zenity --height=300 --list --title="Select Nub-mode for the right nub" --text="Please select the modus for the right nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves." --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "mbuttons" "Use the nub for mousebuttons" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick") ; then