openleap/PyLeapMouse — pull request #19 by GCorbel (2013-09-22 14:17:27+00:00)
Title: enable to do commands with motions

I created to the possibilty to bind gestures and commands. You must to add a file named `commands.ini` at the root of the folder. If we run the code like this `python PyLeapMouse.py --motion`.

The code is probably not perfect, I'm not a Python developer. Please, let me know if you whant to change something.

Motions are imprecise. Some movement are detected when there is nothing. This problem is due to leap motion. If you have a technic to be more precise, again, let me know.

This is an example of a commands.ini file.

[screentap]

[keytap]

[swiperight]
1finger: rhythmbox-client --next
2finger: rhythmbox-client --next
3finger: rhythmbox-client --next
4finger: rhythmbox-client --next
5finger: rhythmbox-client --next

[swipeleft]
1finger: rhythmbox-client --previous
2finger: rhythmbox-client --previous
3finger: rhythmbox-client --previous
4finger: rhythmbox-client --previous
5finger: rhythmbox-client --previous

[clockwise]
1finger: rhythmbox-client --play
2finger: rhythmbox-client --play
3finger: rhythmbox-client --play
4finger: rhythmbox-client --play
5finger: rhythmbox-client --play

[counterclockwise]
1finger: rhythmbox-client --pause
2finger: rhythmbox-client --pause
3finger: rhythmbox-client --pause
4finger: rhythmbox-client --pause
5finger: rhythmbox-client --pause