summaryrefslogtreecommitdiffstats
path: root/py3status/modules/pomodoro.py
diff options
context:
space:
mode:
Diffstat (limited to 'py3status/modules/pomodoro.py')
-rw-r--r--py3status/modules/pomodoro.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/py3status/modules/pomodoro.py b/py3status/modules/pomodoro.py
index ecb3f57..38f8020 100644
--- a/py3status/modules/pomodoro.py
+++ b/py3status/modules/pomodoro.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
"""
-Pomodoro countdown on i3bar originally written by @Fandekasp (Adrien Lemaire)
+Display and control a Pomodoro countdown.
+
+@author Fandekasp (Adrien Lemaire), rixx, FedericoCeratto
"""
from subprocess import call
@@ -151,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'):
"""
@@ -212,7 +218,7 @@ class Py3status:
try:
mixer.music.load(sound_fname)
- except Exception as e:
+ except Exception:
return
mixer.music.play()