2016-10-31 15:23:59 +01:00
|
|
|
import bumblebee.module
|
|
|
|
import bumblebee.util
|
|
|
|
|
2016-10-31 16:08:03 +01:00
|
|
|
def description():
|
2016-11-05 16:18:53 +01:00
|
|
|
return "Draws a widget with configurable content."
|
|
|
|
|
|
|
|
def parameters():
|
|
|
|
return [ "spacer.text: Text to draw (defaults to '')" ]
|
2016-10-31 16:08:03 +01:00
|
|
|
|
2016-10-31 15:23:59 +01:00
|
|
|
class Module(bumblebee.module.Module):
|
2016-12-02 18:53:34 +01:00
|
|
|
def __init__(self, output, config):
|
|
|
|
super(Module, self).__init__(output, config)
|
2016-10-31 15:23:59 +01:00
|
|
|
|
2016-11-05 13:53:08 +01:00
|
|
|
def widgets(self):
|
2016-11-05 14:26:02 +01:00
|
|
|
return bumblebee.output.Widget(self, self._config.parameter("text", ""))
|
2016-10-31 15:23:59 +01:00
|
|
|
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|