[modules] add a module "keys" that shows whether a key is pressed
also, add backend functionality to hide individual widgets of a module.
This commit is contained in:
parent
7d0d1455c8
commit
8d88b23947
4 changed files with 46 additions and 28 deletions
|
@ -190,9 +190,9 @@ class Module(core.input.Object):
|
|||
:rtype: bumblebee_status.widget.Widget
|
||||
"""
|
||||
|
||||
def add_widget(self, full_text="", name=None):
|
||||
def add_widget(self, full_text="", name=None, hidden=False):
|
||||
widget_id = "{}::{}".format(self.name, len(self.widgets()))
|
||||
widget = core.widget.Widget(full_text=full_text, name=name, widget_id=widget_id)
|
||||
widget = core.widget.Widget(full_text=full_text, name=name, widget_id=widget_id, hidden=hidden)
|
||||
self.widgets().append(widget)
|
||||
widget.module = self
|
||||
return widget
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue