diff --git a/bumblebee/output.py b/bumblebee/output.py index e582d34..6654cf7 100644 --- a/bumblebee/output.py +++ b/bumblebee/output.py @@ -19,6 +19,7 @@ class Widget(object): self.module = module.name def state(self): + """Return the widget's state""" return "state-default" def full_text(self): diff --git a/bumblebee/theme.py b/bumblebee/theme.py index ddcd249..42f86ad 100644 --- a/bumblebee/theme.py +++ b/bumblebee/theme.py @@ -17,6 +17,9 @@ class Theme(object): def __init__(self, name): self._init(self.load(name)) self._widget = None + self._cycle_idx = 0 + self._cycle = {} + self._prevbg = None def _init(self, data): """Initialize theme from data structure""" @@ -67,9 +70,11 @@ class Theme(object): return self._get(widget, "separator", None) def separator_fg(self, widget): + """Return the separator's foreground/text color""" return self.bg(widget) def separator_bg(self, widget): + """Return the separator's background color""" return self._prevbg def separator_block_width(self, widget): diff --git a/tests/test_theme.py b/tests/test_theme.py index 75e7bc6..aa6ad6b 100644 --- a/tests/test_theme.py +++ b/tests/test_theme.py @@ -82,11 +82,12 @@ class TestTheme(unittest.TestCase): theme = self.theme data = theme.data() - self.assertEquals(theme.separator_block_width(self.anyWidget), data["defaults"]["separator-block-width"]) + self.assertEquals(theme.separator_block_width(self.anyWidget), + data["defaults"]["separator-block-width"] + ) def test_separator(self): for theme in [self.theme, self.cycleTheme]: - data = theme.data() theme.reset() prev_bg = theme.bg(self.anyWidget) theme.bg(self.anotherWidget) diff --git a/tests/util.py b/tests/util.py index ff9249d..fcf6c9d 100644 --- a/tests/util.py +++ b/tests/util.py @@ -30,6 +30,7 @@ class MockOutput(object): class MockWidget(Widget): def __init__(self, text): + super(MockWidget, self).__init__(text) self._text = text self.module = None self.attr_state = "state-default"