[Galaxy S II Original Android Development] Tungstwenty:
Great initiative Flint!

This will be really useful for wider adoption of this "oh so scary" script-only feature ;)

Here are some comments from me on your current Todo list:

Generate the scripts

Since there's at least 3 ways of launching the scripts (I wasn't aware of all these :)), I'd suggest deciding a well-known place for storing per-gesture files for configuration (finger positions) and for actions (execution when detected) which would then be called by the main script(s).

Example:

[B]/etc/gestures/gesture-1.config[/B]

1:1:(0|100;0|100)
...

and

[B]/etc/gestures/gesture-1.sh[/B]

# Toggle "outdoor" mode

if [ `cat /sys/class/lcd/panel/user_gamma_adjust` != "50" ]; then
echo "50" > /sys/class/lcd/panel/user_gamma_adjust
echo 1 > sys/class/mdnie/mdnie/outdoor
else
echo "0" > /sys/class/lcd/panel/user_gamma_adjust
echo 0 > sys/class/mdnie/mdnie/outdoor
fi

Each of the wrapper script implementations would then:

- cat the *.config files all at once to the gesture_definitions file (it currently doesn't support incremental configuration, each write clears all the previous definition)

- loop waiting for a detected gesture and when each of those is detected launch the corresponding gesture-N.sh if it exists

This allows the definition and detection logic to keep working, and at the same time allow a frontend app such as this one to granularly parse and store each gesture's individual definition and action.

Additionally, the main script(s) can then be fixed and all the logic of maximum gestures, etc. depend only on whatever files exist on /etc/gestures/ or whatever. The app can ignore that part, especially taking into consideration that there are different approaches.

On a side note, I still am not sure about DorimanX's approach of stopping the loop while the screen is off, as the overhead afaik is nearly none (is memory relevant?). Also, I'm thinking of allow the configuration of whether you'd like gestures while screen is off or not; now that Siyah includes s2w it's merely an extra check and the associate configuration parameter for STweaks.

Review gesture paths

I also think this would be useful, not only for viewing but also "tuning".

Actual situation: if I want to draw e.g. a diagonal from top-left to bottom-right, it will pick up some of the rectangles in the middle depending on how much I deviate from the ideal diagonal.

Ideally, once a gesture is finished one would see all the touched rectangles - probably a small circle in the middle - and allow the removal of some of them as in the situation of the diagonal where the intermediate steps should be removed.

There are of course some challenges, like crossing paths or even the same finger that repeats the same path multiple times. Personally, the gesture I use to kill the current app is: 1 finger on the middle-left, another one goes from top-right to bottom-right and back, 3 times in a row.

Actions

In this topic I see several things:

- launching an app (which could allow you to browse for an app, or even better, configure a shortcut which can be a direct dial, compose message to, etc.)

- all the other advanced stuff that can be done by "am start ...", "service call ...", etc.

For this second group of items, perhaps a list of well-known things could be added gradually to the app, and still allow a fallback of directly editing the script's text for those things the user would like to add himself.