Mesk Plugins

A plugin can be any python module in ${HOME}/.mesk/plugins or <install-dir>/mesk/plugins. By default, install-dir is /usr/local/lib.

The module must contain an object of type mesk.plugin.plugin.PluginInfo? and it MUST be called PLUGIN_INFO. For example:

PLUGIN_INFO = PluginInfo(name='gajimstatus',
                         desc=_('Uses Gajim (a Jabber/XMPP instant '
                                'message client) to update your status '
                                'message with currently playing song info'),
                         author='Travis Shirk <travis@pobox.com>',
                         url='http://trac.nicfit.net/wiki/GajimStatusPlugin',
                         copyright='Copyright © 2006 Travis Shirk',
                         clazz=GajimStatusPlugin,
                         xpm=XPM)

In the above example, the clazz argument is the class name for creating an instance of the plugin. This class MUST have a constructor that takes no arguments.

class Plugin:
    def __init__(self, name, description, author, url, copyright, xpm):
        '''Constructor for initialization opf plugin module varaibles'''
    def shutdown(self):
        '''Called when the plugin is shutdown or deactivated'''
    def is_configurable(self):
        '''Return True if the plugin supports configuration.
           Defaults to False'''
        return False
    def configure(self, parent):
        '''Display a configuration window. Use self.config_window as as a
        cache if desired.'''