From e4151685ff4b0f4f0fd10127af150d8fac795b65 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Sun, 12 Apr 2020 14:19:24 +0200 Subject: [PATCH] [modules] re-add spacer --- modules/core/spacer.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 modules/core/spacer.py diff --git a/modules/core/spacer.py b/modules/core/spacer.py new file mode 100644 index 0000000..b89c233 --- /dev/null +++ b/modules/core/spacer.py @@ -0,0 +1,23 @@ +# pylint: disable=C0111,R0903 + +"""Draws a widget with configurable text content. + +Parameters: + * spacer.text: Widget contents (defaults to empty string) +""" + +import bumblebee.input +import bumblebee.output +import bumblebee.engine + +class Module(bumblebee.engine.Module): + def __init__(self, engine, config): + super(Module, self).__init__(engine, config, + bumblebee.output.Widget(full_text=self.text) + ) + self._text = self.parameter("text", "") + + def text(self, widget): + return self._text + +# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4