bumblebee-status/core/widget.py
Tobias Witek 6adc497f68 [core] Add support for module parameters
Parse '-p' parameters and make them accessible via 'parameter()' from
within a module (basically, restore the previous configuration
facility).

Still TODO: Add support for configuration files.
2020-02-04 21:09:11 +01:00

15 lines
401 B
Python

import util.store
class Widget(util.store.Store):
def __init__(self, full_text):
self._full_text = full_text
def full_text(self, value=None):
if value:
self._full_text = value
else:
if callable(self._full_text):
return self._full_text()
return self._full_text
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4