mirror of
https://github.com/vale981/pomm.el
synced 2025-03-05 09:41:42 -05:00
add option to disable ticking sound
This commit is contained in:
parent
6dc3b5f913
commit
1202197e5b
1 changed files with 7 additions and 1 deletions
8
pomm.el
8
pomm.el
|
@ -161,6 +161,11 @@ a particular event."
|
||||||
:group 'pomm
|
:group 'pomm
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
(defcustom pomm-audio-tick-enabled nil
|
||||||
|
"Whether to play ticking sound."
|
||||||
|
:group 'pomm
|
||||||
|
:type 'boolean)
|
||||||
|
|
||||||
(defun pomm--get-sound-file-path (name)
|
(defun pomm--get-sound-file-path (name)
|
||||||
"Get path to the sound resource NAME.
|
"Get path to the sound resource NAME.
|
||||||
|
|
||||||
|
@ -327,7 +332,8 @@ which can be played by `pomm-audio-player-executable'."
|
||||||
(unless pomm-audio-player-executable
|
(unless pomm-audio-player-executable
|
||||||
(error "No audio player executable! Set 'pomm-audio-player-executable'")
|
(error "No audio player executable! Set 'pomm-audio-player-executable'")
|
||||||
(setq pomm-audio-enabled nil))
|
(setq pomm-audio-enabled nil))
|
||||||
(when-let (sound (alist-get kind pomm-audio-files))
|
(when-let ((play-sound (or (not (eq 'tick kind)) pomm-audio-tick-enabled))
|
||||||
|
(sound (alist-get kind pomm-audio-files)))
|
||||||
(start-process
|
(start-process
|
||||||
"pomm-audio-player"
|
"pomm-audio-player"
|
||||||
nil
|
nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue