summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUltrabug <ultrabug@ultrabug.net>2015-03-28 13:37:08 +0100
committerUltrabug <ultrabug@ultrabug.net>2015-03-28 13:37:08 +0100
commit68cb484b373f28288b95caada990f6801ae6115d (patch)
tree352470b43feade7da95ef296da7c1c39dc1d9a82
parentbf1d875da988b53059212b178358899582ac4526 (diff)
parentcd1c82f5bc4497ea649e351fd94b8708802b7d21 (diff)
Merge pull request #87 from FedericoCeratto/patch-1
Pomodoro: play sounds before nagging the user by @FedericoCeratto
-rw-r--r--py3status/modules/pomodoro.py8
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'):
"""