kitt Package

kitt Package

actions Module

class kitt.actions.Actions(actions_config, gestures_config)[source]

This class loads all the actions and gesture, and does the binding between them. Then, when a gesture is found by the listener, the gesture gets dispatched.

after()[source]

safeguard function to be called after a touch is defined

before()[source]

safeguard function to be called before a touch is defined

dispatch(gestures, gdb)[source]

dispatches found gestures, matched using the gesture database into gesture events. :param gestures: list of live gestures :param gdb: kivy’s gesture database object

get_gestures()[source]
Returns:the gesture dict
update_gestures(model)[source]

daemon Module

class kitt.daemon.Daemon(pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null', args=None)[source]

A generic daemon class.

Usage: subclass the Daemon class and override the run() method

daemonize()[source]

do the UNIX double-fork magic, see Stevens’ “Advanced Programming in the UNIX Environment” for details (ISBN 0201563177) http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16

delpid()[source]
restart()[source]

Restart the daemon

run()[source]

You should override this method when you subclass Daemon. It will be called after the process has been daemonized by start() or restart().

start()[source]

Start the daemon

stop()[source]

Stop the daemon

kitt Module

class kitt.kitt.UdevListener(gobject_loop, el, listener, log)[source]

Bases: threading.Thread

device_added(observer, device)[source]
device_removed(observer, device)[source]
run()[source]
kitt.kitt.run()[source]

main function that parses the cli arguments and starts the application

listener Module

class kitt.listener.Listener(config, gestures, el, *args, **kwarg)[source]

Bases: kivy._event.EventDispatcher

listener function that queries kivy for touch events, builds the gesture and dispatch it through the actions singleton.

dispatch(ev_type, ev_action, ev)[source]

dispatches motion events

on_motion(etype, me)[source]

dispatches motion events

on_touch_down(touch)[source]

listening function executed at begining of touch event builds the gesture

on_touch_move(touch)[source]

listening function executed during touch event store points of the gesture

on_touch_up(touch)[source]

touch is over, display informations, and check if it matches some known gesture.

update_devices()[source]
kitt.listener.make_gesture(name, point_list)[source]

A simple helper function

plugin_dbus Module

plugin_wnck Module

kitt.plugin_wnck.workspace_down()[source]
kitt.plugin_wnck.workspace_up()[source]

plugin_xlib Module

kitt.plugin_xlib.do_key_press(keys, target=None)[source]

executes a keypress

Parameters:
  • keys – argument tuple containing one or several modifier keys, and the key to press
  • target – list containing name(s) of the target window

the key to pass as a parameter has to be taken from Xlib.XK library

kitt.plugin_xlib.do_mouse_click(button, target=None)[source]

executes mouse button click

Parameters:
  • button – X.Button1, X.Button2 or X.Button3 depending on which button to be triggered
  • target – list containing name(s) of the target window
kitt.plugin_xlib.grab_mouse()[source]
kitt.plugin_xlib.switch_workspace(direction)[source]

switches workspace

Parameters:direction – +1 for next workspace, -1 for previous workspace.
kitt.plugin_xlib.ungrab_mouse()[source]