From f2d6f2f319b3a2ae90f3b4aef1db4b785f29888d Mon Sep 17 00:00:00 2001 From: Zero Rust Date: Sat, 16 May 2020 07:24:14 -0400 Subject: [PATCH 1/2] moving the module setter to after module init --- bumblebee_status/modules/contrib/network_traffic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bumblebee_status/modules/contrib/network_traffic.py b/bumblebee_status/modules/contrib/network_traffic.py index 61192f7..f5313e0 100644 --- a/bumblebee_status/modules/contrib/network_traffic.py +++ b/bumblebee_status/modules/contrib/network_traffic.py @@ -17,23 +17,23 @@ import util.format WIDGET_NAME = "network_traffic" - class Module(core.module.Module): def __init__(self, config, theme): widgets = [ core.widget.Widget( - module=self, name="{0}.rx".format(WIDGET_NAME), full_text=self.download_rate, ), core.widget.Widget( - module=self, name="{0}.tx".format(WIDGET_NAME), full_text=self.upload_rate, ), ] 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()[1].set("theme.minwidth", "0000000KiB/s") From 6d89cef60077fa3fafe61d5e2467a9ef718b0514 Mon Sep 17 00:00:00 2001 From: Zero Rust Date: Sun, 17 May 2020 07:16:33 -0400 Subject: [PATCH 2/2] cleaning up to match style --- bumblebee_status/modules/contrib/network_traffic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bumblebee_status/modules/contrib/network_traffic.py b/bumblebee_status/modules/contrib/network_traffic.py index f5313e0..b90c1c5 100644 --- a/bumblebee_status/modules/contrib/network_traffic.py +++ b/bumblebee_status/modules/contrib/network_traffic.py @@ -17,6 +17,7 @@ import util.format WIDGET_NAME = "network_traffic" + class Module(core.module.Module): def __init__(self, config, theme): widgets = [