From cd1c82f5bc4497ea649e351fd94b8708802b7d21 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Fri, 27 Mar 2015 18:28:15 +0000 Subject: Pomodoro: play sounds before nagging the user. --- py3status/modules/pomodoro.py | 8 ++++++-- 1 file 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'): """ -- cgit v1.3