summaryrefslogtreecommitdiff
path: root/ttystatus/counter.py
diff options
context:
space:
mode:
Diffstat (limited to 'ttystatus/counter.py')
-rw-r--r--ttystatus/counter.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ttystatus/counter.py b/ttystatus/counter.py
index 5d3e11f..d37ed90 100644
--- a/ttystatus/counter.py
+++ b/ttystatus/counter.py
@@ -21,16 +21,17 @@ class Counter(ttystatus.Widget):
'''Display a count of how many times a value has changed.'''
+ static_width = False
+
def __init__(self, name):
self.name = name
self.prev = None
self.count = 0
- self.interesting_keys = [name]
- def format(self):
+ def render(self, width):
return str(self.count)
- def update(self, master, width):
+ def update(self, master):
if master[self.name] != self.prev:
self.prev = master[self.name]
self.count += 1