diff --git a/bumblebee/modules/nic.py b/bumblebee/modules/nic.py index a943177..5d23483 100644 --- a/bumblebee/modules/nic.py +++ b/bumblebee/modules/nic.py @@ -44,12 +44,13 @@ class Module(bumblebee.module.Module): try: iw.get_interface_by_ifindex(idx) self._cache["wlan{}".format(intf)] = True - except exception as e: + except Exception as e: self._cache["wlan{}".format(intf)] = False - return self._cache + return self._cache["wlan{}".format(intf)] def state(self): t = "wireless" if self._iswlan(self._intf) else "wired" + return "{}-{}".format(t, self._state) def warning(self): diff --git a/bumblebee/outputs/i3.py b/bumblebee/outputs/i3.py index 4d03f8a..d2a37ee 100644 --- a/bumblebee/outputs/i3.py +++ b/bumblebee/outputs/i3.py @@ -16,8 +16,9 @@ class i3bar(bumblebee.output.Output): theme = self.theme() while True: + d = obj.data() data = { - u"full_text": "{}{}{}".format(theme.prefix(obj), obj.data(), theme.suffix(obj)), + u"full_text": "{}{}{}".format(theme.prefix(obj), d, theme.suffix(obj)), "color": theme.color(obj), "background": theme.background(obj), }