From 10b0f17a2484c3d4ff012a27aef829668f9429b7 Mon Sep 17 00:00:00 2001 From: Robert Suhada Date: Mon, 31 Oct 2016 13:21:53 +0100 Subject: [PATCH] Added tick-sound period variable User can adjust how often the "tick" is played --- org-pomodoro.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/org-pomodoro.el b/org-pomodoro.el index a66c27f..1576e90 100644 --- a/org-pomodoro.el +++ b/org-pomodoro.el @@ -206,6 +206,11 @@ Use `org-pomodoro-long-break-sound' to determine what sound that should be." :group 'org-pomodoro :type 'file) +(defcustom org-pomodoro-tick-period 1 + "How often to play the tick sound in seconds." + :group 'org-pomodoro + :type 'integer) + (defcustom org-pomodoro-ticking-sound-args nil "Arguments used when playing the `org-pomodoro-ticking-sound'." :group 'org-pomodoro @@ -426,11 +431,11 @@ invokes the handlers for finishing." "Set the org-pomodoro STATE." (setq org-pomodoro-state state org-pomodoro-countdown - (cl-case state - (:pomodoro (* 60 org-pomodoro-length)) - (:short-break (* 60 org-pomodoro-short-break-length)) - (:long-break (* 60 org-pomodoro-long-break-length))) - org-pomodoro-timer (run-with-timer t 1 'org-pomodoro-tick))) + (cl-case state + (:pomodoro (* 60 org-pomodoro-length)) + (:short-break (* 60 org-pomodoro-short-break-length)) + (:long-break (* 60 org-pomodoro-long-break-length))) + org-pomodoro-timer (run-with-timer t org-pomodoro-tick-period 'org-pomodoro-tick))) (defun org-pomodoro-start (&optional state) "Start the `org-pomodoro` timer.