KiTT

HomePage: http://m0g.net/kitt/

Author: Bernard `Guyzmo` Pratz

Download: https://pypi.python.org/packages/source/K/KiTT/KiTT-1.1.tar.gz

        KiTT: Kivy Touch Tool
=====================

This tool is a little Xorg service that provides a way to define
multitouch gestures for Xorg UI control. It is based on Kivy for gesture
detection and can run a variety of plugins to control the UI. You can
easily configure your gestures using a json configuration file.

KiTT takes advantage of the awesome work done by the
`Kivy <http://kivy.org>`_ team on touch and gesture detection framework.
Your mouse has to be detected by Kivy in order to work with KiTT, and
thus shall exists as a known ``/dev/input/event?`` device.

And
`here <http://nothing.to/blog/2013/05/22/kitt:-a-multitouch-gesture-tool-based-on-kivy>`_
I wrote a blog post about it!

INSTALL
-------

To install the application, just get it from pipy:

::

    pip install kitt

To run it at startup of Xorg, don't forget to add ``kitt start`` in your
``.xinitrc`` or ``.xsession`` file!

CONFIGURE
---------

Have a look at kivy specific `configuration
options <http://kivy.org/docs/guide/config.html>`_

-  actions configuration file: ``config_actions.json``

To add a new gesture and bind actions, you shall create a configuration
file, either in the default path: ``~/.kivy/kitt.json`` or a file you
can specify using a command line option.

To configure, the file shall match the following format, be careful,
every comma, quote or bracket is important:

::

    {
        "engines": [],
        "actions": {
            "pinch_in"          : [],
            "pinch_out"         : [],
            "two_swipe_up"      : [],
            "two_swipe_down"    : [],
            "two_swipe_left"    : [],
            "two_swipe_right"   : [],
            "three_swipe_up"    : [],
            "three_swipe_down"  : [],
            "three_swipe_left"  : [],
            "three_swipe_right" : [],
            "four_swipe_up"     : [],
            "four_swipe_down"   : [],
            "four_swipe_left"   : [],
            "four_swipe_right"  : []
        }
    }

    * The `engines` key can contain three plugins: `xlib`, `wnck` and `dbus`.
    * The `action` key contains for each known common multitouch gesture the action to trigger,
    that depends on the engine you use.

-  gestures configuration file: ``config_gestures.json``:

   ::

       {
           "move_down" : [],
           "move_up"   : [],
           "move_left" : [],
           "move_right": []
       }

   -  The ``gestures`` key contains the specific gestures for your touch
      device. To record them, you have to execute kitt as follows, and
      copy the long ununderstandable strings that it outputs for each
      gesture you want to record.

      kitt foreground -v

Here are the different actions available:

-  ``xlib`` engine: { "function": "workspace", "parameters": {
   "direction": "N" } }

switch current worskpace, N being the number of workspaces to jump over
(can be a positive or negative number)

::

    { 
      "function": "keypress", 
      "parameters": {
        "target": ["app1", "app2"],
        "keys": ["KEY1", "KEY2"]
      } 
    } 

executes a key stroke, which can be a combination of several keys
(modifier keys, or input keys from the list below) the "target"
attribute is one of the ``wm-class`` property of the window. It can be
found when triggering the action on an unknown window, when in
``foreground`` mode.

::

    { "function": "mouseclick", 
      "parameters": {
        "button": "ButtonN"
      } 
    }

executes a click (can be either ``Button1``, ``Button2``, ``Button3``,
``button4``, ``Button5``)

-  ``wnck`` engine:

   { "function": "workspace\_up", parameters: {} }

switch to previous workspace

::

    { "function": "workspace_down", parameters: {} }

switch to next workspace

-  ``dbus`` engine:

   { "function": "send\_dbus", "parameters": { "service":
   "name.of.the.service", "path": "/path/to/the/object", "method":
   "methodName" "parameters": ["param1", "param2"...] } }

call method on service ``service``, object path ``object`` with all
needed parameters

DEVELOP
-------

For development, you'll need zc.buildout
(``apt-get i