From 025d3fcb515be6f1ed3e462a10654aa0ad7ed13f Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Thu, 26 Oct 2023 09:00:09 +0200 Subject: [PATCH] fix(module/shell): synchonous invocation was broken For some (unknown) reason, redrawing while in the update loop breaks the update (this probably warrants a closer look). As a quickfix to restore functionality, remove the unnecessary redraw call and move it into the async codepath, where it is actually needed. fixes #1001 --- bumblebee_status/modules/contrib/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee_status/modules/contrib/shell.py b/bumblebee_status/modules/contrib/shell.py index 46352b2..4aabb5a 100644 --- a/bumblebee_status/modules/contrib/shell.py +++ b/bumblebee_status/modules/contrib/shell.py @@ -53,6 +53,7 @@ class Module(core.module.Module): def set_output(self, value): self.__output = value + core.event.trigger("update", [self.id], redraw_only=True) @core.decorators.scrollable def get_output(self, _): @@ -62,7 +63,6 @@ class Module(core.module.Module): # if requested then run not async version and just execute command in this thread if not self.__async: self.__output = util.cli.execute(self.__command, shell=True, ignore_errors=True).strip() - core.event.trigger("update", [self.id], redraw_only=True) return # if previous thread didn't end yet then don't do anything