Can you change Nub modes via terminal/bash script?


ozzyfreakdude

Still Fresh
Joined
Feb 14, 2011
Messages
92
Hey all


I know that the standard way to change nub modes (ex. make the right nub act as joystick) is through the nubs option in the settings menu.


I was wondering if there's a back-end way to do this, such as a terminal command that will change nub modes. That way one could create a script to change to a specific nub mode, run a particular program (that doesn't automatically change nub modes), and then change them back to your normal nub mode after execution.
 
Yes you can. It typically goes something like:



Code:
NUB0MODE=`cat /proc/pandora/nub0/mode`

NUB1MODE=`cat /proc/pandora/nub1/mode`

echo absolute > /proc/pandora/nub0/mode

echo absolute > /proc/pandora/nub1/mode

/run/your/program/here -arguments -and -stuff

echo $NUB0MODE > /proc/pandora/nub0/mode

echo $NUB1MODE > /proc/pandora/nub1/mode

You record the current nub modes so you can restore them later. The modes are


absolute: treat nub as joystick


mouse: treat nub as mouse cursor


mbuttons: treat nub as mouse buttons


scroll: treat nub as scroll wheel


In the future there may be other nub modes as well, I suspect.
 
Back
Top