[modules/spacer] update to latest api
This commit is contained in:
parent
e4151685ff
commit
f7ee2e87bb
1 changed files with 10 additions and 11 deletions
|
@ -6,18 +6,17 @@ Parameters:
|
||||||
* spacer.text: Widget contents (defaults to empty string)
|
* spacer.text: Widget contents (defaults to empty string)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import bumblebee.input
|
import core.module
|
||||||
import bumblebee.output
|
import core.widget
|
||||||
import bumblebee.engine
|
import core.decorators
|
||||||
|
|
||||||
class Module(bumblebee.engine.Module):
|
class Module(core.module.Module):
|
||||||
def __init__(self, engine, config):
|
@core.decorators.every(minutes=60)
|
||||||
super(Module, self).__init__(engine, config,
|
def __init__(self, config):
|
||||||
bumblebee.output.Widget(full_text=self.text)
|
super().__init__(config, core.widget.Widget(self.text))
|
||||||
)
|
self.__text = self.parameter("text", "")
|
||||||
self._text = self.parameter("text", "")
|
|
||||||
|
|
||||||
def text(self, widget):
|
def text(self, _):
|
||||||
return self._text
|
return self.__text
|
||||||
|
|
||||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||||
|
|
Loading…
Add table
Reference in a new issue