diff options
| author | Federico Ceratto <federico.ceratto@gmail.com> | 2015-03-27 18:28:15 +0000 |
|---|---|---|
| committer | Federico Ceratto <federico.ceratto@gmail.com> | 2015-03-27 18:28:15 +0000 |
| commit | cd1c82f5bc4497ea649e351fd94b8708802b7d21 (patch) | |
| tree | 352470b43feade7da95ef296da7c1c39dc1d9a82 /py3status | |
| parent | bf1d875da988b53059212b178358899582ac4526 (diff) | |
Pomodoro: play sounds before nagging the user.
Diffstat (limited to 'py3status')
| -rw-r--r-- | py3status/modules/pomodoro.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/py3status/modules/pomodoro.py b/py3status/modules/pomodoro.py index 94b8ef6..38f8020 100644 --- a/py3status/modules/pomodoro.py +++ b/py3status/modules/pomodoro.py @@ -153,17 +153,21 @@ class Py3status: if self.timer < 0: self.alert = True self.run = False + if self.status == 'start': + self.__play_sound(self.sound_pomodoro_end) + + elif self.status == 'break': + self.__play_sound(self.sound_break_end) + self.__i3_nagbar() if self.status == 'start': self.__setup('break') self.status = 'break' - self.__play_sound(self.sound_pomodoro_end) elif self.status == 'break': self.__setup('start') self.status = 'start' - self.__play_sound(self.sound_break_end) def __i3_nagbar(self, level='warning'): """ |
