Merge branch 'development' into arandr
This commit is contained in:
commit
f944d7c489
5 changed files with 19 additions and 9 deletions
|
@ -154,8 +154,9 @@ class Module(core.input.Object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def add_widget(self, full_text="", name=None):
|
def add_widget(self, full_text="", name=None):
|
||||||
widget = core.widget.Widget(full_text=full_text, name=name, module=self)
|
widget = core.widget.Widget(full_text=full_text, name=name)
|
||||||
self.widgets().append(widget)
|
self.widgets().append(widget)
|
||||||
|
widget.module = self
|
||||||
return widget
|
return widget
|
||||||
|
|
||||||
"""Convenience method to retrieve a named widget
|
"""Convenience method to retrieve a named widget
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
|
import logging
|
||||||
|
|
||||||
import core.input
|
import core.input
|
||||||
import core.decorators
|
import core.decorators
|
||||||
|
|
||||||
import util.store
|
import util.store
|
||||||
import util.format
|
import util.format
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Widget(util.store.Store, core.input.Object):
|
class Widget(util.store.Store, core.input.Object):
|
||||||
def __init__(self, full_text="", name=None, module=None):
|
def __init__(self, full_text="", name=None):
|
||||||
super(Widget, self).__init__()
|
super(Widget, self).__init__()
|
||||||
self.__full_text = full_text
|
self.__full_text = full_text
|
||||||
self.module = module
|
self.module = None
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -27,6 +31,13 @@ class Widget(util.store.Store, core.input.Object):
|
||||||
custom_ids = util.format.aslist(module.parameter("id"))
|
custom_ids = util.format.aslist(module.parameter("id"))
|
||||||
if len(custom_ids) > self.index():
|
if len(custom_ids) > self.index():
|
||||||
self.id = custom_ids[self.index()]
|
self.id = custom_ids[self.index()]
|
||||||
|
if util.format.asbool(module.parameter("scrolling", False)) == True:
|
||||||
|
if callable(self.__full_text):
|
||||||
|
self.__full_text = core.decorators.scrollable(
|
||||||
|
self.__full_text.__func__
|
||||||
|
).__get__(module)
|
||||||
|
else:
|
||||||
|
log.warning("unable to make scrollable: {}".format(module.name))
|
||||||
|
|
||||||
def index(self):
|
def index(self):
|
||||||
if not self.module:
|
if not self.module:
|
||||||
|
|
|
@ -32,9 +32,6 @@ class Module(core.module.Module):
|
||||||
]
|
]
|
||||||
super().__init__(config, theme, widgets)
|
super().__init__(config, theme, widgets)
|
||||||
|
|
||||||
self.widgets()[0].module = self
|
|
||||||
self.widgets()[1].module = self
|
|
||||||
|
|
||||||
self.widgets()[0].set("theme.minwidth", "0000000KiB/s")
|
self.widgets()[0].set("theme.minwidth", "0000000KiB/s")
|
||||||
self.widgets()[1].set("theme.minwidth", "0000000KiB/s")
|
self.widgets()[1].set("theme.minwidth", "0000000KiB/s")
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ If that is not an acceptable solution, here are different ways to step
|
||||||
back to the last stable version:
|
back to the last stable version:
|
||||||
|
|
||||||
git
|
git
|
||||||
``git checkout v1.10``
|
``git checkout v1.10.4``
|
||||||
pip
|
pip
|
||||||
``pip install --user --force-reinstall bumblebee-status==1.10``
|
``pip install --user --force-reinstall bumblebee-status==1.10.4``
|
||||||
aur
|
aur
|
||||||
TODO
|
``# checkout rev. 9a53906a0decf30946c22976c8b4f34ab4354d74 from https://aur.archlinux.org/bumblebee-status.git`
|
||||||
|
|
||||||
My bar doesn’t show any background colors
|
My bar doesn’t show any background colors
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
## Improvements
|
## Improvements
|
||||||
- app launcher (list of apps, themeable)
|
- app launcher (list of apps, themeable)
|
||||||
|
- github pages?
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
- themes: use colors to improve theme readability
|
- themes: use colors to improve theme readability
|
||||||
|
|
Loading…
Reference in a new issue