TMU (Too Many Updates)

This commit is contained in:
Geoffrey Frogeye 2019-10-17 12:44:30 +02:00
parent 392dfed89a
commit 789f26d925
12 changed files with 147 additions and 76 deletions

View file

@ -125,9 +125,9 @@ class RamProvider(AlertingSection, PeriodicUpdater):
if self.state < 1:
return None
text = Text(Section.ramp(1-freePerc))
text = Text(Section.ramp(freePerc))
if self.state >= 2:
freeStr = humanSize(mem.available)
freeStr = humanSize(mem.total - mem.available)
text.append(freeStr)
if self.state >= 3:
totalStr = humanSize(mem.total)
@ -696,12 +696,12 @@ class I3WorkspacesProvider(Section, I3Updater):
# if parent.display != workspace["display"]:
# continue
section = I3WorkspacesProviderSection(workspace["name"], self)
section.focused = workspace["focused"]
section.urgent = workspace["urgent"]
section = I3WorkspacesProviderSection(workspace.name, self)
section.focused = workspace.focused
section.urgent = workspace.urgent
section.show()
parent.addSectionAfter(lastSection, section)
self.sections[workspace["num"]] = section
self.sections[workspace.num] = section
lastSection = section