diff options
| author | rixx <rixx-git@cutebit.de> | 2015-03-19 15:22:53 +0100 |
|---|---|---|
| committer | rixx <rixx-git@cutebit.de> | 2015-03-19 15:22:53 +0100 |
| commit | 64a78c990dd072ba3d70e182c4f16e55c9e9ef3b (patch) | |
| tree | 7c043d6da90c8b77e310013ffb91e17ca8a49b6a | |
| parent | c2e23c442f9df310d94ff9b44835096a43257001 (diff) | |
Left click can now pause and resume a Pomodoro
| -rw-r--r-- | py3status/modules/pomodoro.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/py3status/modules/pomodoro.py b/py3status/modules/pomodoro.py index db2a60d..bf86e96 100644 --- a/py3status/modules/pomodoro.py +++ b/py3status/modules/pomodoro.py @@ -27,7 +27,21 @@ class Py3status: if event['button'] == 1: if self.status == 'stop': self.status = 'start' - self.run = True + self.run = True + + elif self.status == 'break': + self.run = True + + elif self.status == 'start': + if self.run: + self.status = 'pause' + self.run = False + else: + self.run = True + + elif self.status == 'pause': + self.status = 'start' + self.run = True elif event['button'] == 2: self.__setup('stop') |
