mirror of
https://github.com/vale981/pomm.el
synced 2025-03-04 17:21:43 -05:00
fix: do not play sounds on non-working periods
This commit is contained in:
parent
c7eef01fba
commit
e26a8f9470
1 changed files with 5 additions and 4 deletions
9
pomm.el
9
pomm.el
|
@ -316,7 +316,7 @@ which can be played by `pomm-audio-player-executable'."
|
|||
(setq pomm-audio-enabled nil))
|
||||
(when-let (sound (alist-get kind pomm-audio-files))
|
||||
(start-process
|
||||
"pomm audio player"
|
||||
"pomm-audio-player"
|
||||
nil
|
||||
pomm-audio-player-executable
|
||||
sound))))
|
||||
|
@ -327,8 +327,8 @@ which can be played by `pomm-audio-player-executable'."
|
|||
((eq (alist-get 'status pomm--state) 'stopped)
|
||||
(pomm--maybe-play-sound 'stop))
|
||||
((eq (alist-get 'status pomm--state) 'running)
|
||||
(pomm--maybe-play-sound (alist-get 'kind
|
||||
(alist-get 'current pomm--state))))))
|
||||
(pomm--maybe-play-sound
|
||||
(alist-get 'kind (alist-get 'current pomm--state))))))
|
||||
|
||||
(defun pomm--dispatch-notification (kind)
|
||||
"Dispatch a notification about a start of a period.
|
||||
|
@ -441,7 +441,8 @@ The condition is: (effective-start-time + length) < now."
|
|||
(when (pomm--need-switch-p)
|
||||
(pomm--switch-to-next))
|
||||
(run-hooks 'pomm-on-tick-hook)
|
||||
(pomm--maybe-play-sound 'tick)))))
|
||||
(when (eq (alist-get 'kind (alist-get 'current pomm--state)) 'work)
|
||||
(pomm--maybe-play-sound 'tick))))))
|
||||
|
||||
(defun pomm--get-time-remaning ()
|
||||
"Get time remaining in the current pomodoro period.
|
||||
|
|
Loading…
Add table
Reference in a new issue