Skip to content

creating DE specific extensions

Chad Colgur edited this page May 12, 2013 · 3 revisions

Firstly you need to have read and understood the api specification.

All DE specific items should be added to everpad/specific/DENAME, as example for unity is everpad/specific/unity. Everpad support launchers and executable services as extensions.

Launchers

  1. Create launcher.py in everpad/specific/DENAME.
  2. Create your launcher class, by default we pass app uri, session bus and service path to launcher constructor. And application run launcher update update method and pass dict to it:
{
   'progresss': float beetwen 0 and 1,
   'progress-visible': bool,
}

Launcher for unity as example:

class UnityLauncher(dbus.service.Object):
    def __init__(self, app_uri, *args, **kwargs):
        self.app_uri = app_uri
        self.data = {}
        dbus.service.Object.__init__(self, *args, **kwargs)

    def update(self, data):
        self.data = data
        self.Update(self.app_uri, data)

    @dbus.service.signal(
        dbus_interface='com.canonical.Unity.LauncherEntry',
        signature=("sa{sv}")
    )
    def Update(self, app_uri, properties):
        return

    @dbus.service.method(
        dbus_interface='com.canonical.Unity.LauncherEntry',
        in_signature="", out_signature="sa{sv}",
    )
    def Query(self):
        return self.app_uri, self.data
  1. You can add you launcher to launchers dict, like 'ubuntu': UnityLauncher. As dict key you need to use $DESKTOP_SESSION variable.

executable services

  1. Create your service in everpad/specific/DENAME, as an example you can see unity lens and kde runner
  2. Add it to setup.py entry_points section.
  3. Put additional files in data/ and add them to setup.py.
Clone this wiki locally