Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tick-sound period variable #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions org-pomodoro.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down