Skip to content

Commit

Permalink
Fix NetGraph always at maximum.
Browse files Browse the repository at this point in the history
Compute the changes between `psutil.net_io_counters` readings for
updating the graph.
  • Loading branch information
actbusy authored and ramnes committed Jun 27, 2019
1 parent 517da9c commit 4cf1a8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libqtile/widget/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ def _get_values(self):

def update_graph(self):
val = self._get_values()
self.push(val)
change = val - self.bytes
self.bytes = val
self.push(change)

@staticmethod
def get_main_iface():
Expand Down

0 comments on commit 4cf1a8b

Please sign in to comment.