Merge pull request #875 from SamTebbs33/main

Hide progress module if it's inactive
This commit is contained in:
tobi-wan-kenobi 2022-05-13 13:50:08 +02:00 committed by GitHub
commit 2e8495d5ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,9 @@ class Module(core.module.Module):
super().__init__(config, theme, core.widget.Widget(self.get_progress_text))
self.__active = False
def hidden(self):
return not self.__active
def get_progress_text(self, widget):
if self.update_progress_info(widget):
width = util.format.asint(self.parameter("barwidth", 8))