-
Notifications
You must be signed in to change notification settings - Fork 79
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
[Request] Prompt for new pomodoro after break #89
Comments
Is there any functionality activating another pomodoro after either break automatically yet? I can not seem to find it, if it exists. |
Add a hook to |
I know this is not the sapce to ask something like this, but I am new to emacs/lisp. So the obvious question is, how would one do that? |
I think this should do it:
This will start a pomodoro immediately after both a short and a long break. If you want it to run after just a short break, it's a little more complicated. |
It works! Although the new clock-in happens under the task where the cursor is located, once the new timer is started. So one would have to jump to the current clocking task before this created "hook-timer" starts. |
Ah, yes, then you need something like this:
|
So, I tried your last suggestion, and it works smoothly. Thank you again! |
This would immediately start another Pomodoro in the current header. I meant something different: a prompt or dialogue (those with "Yes" or "No") so I can just press "Y" or "Yes" for a new Pomodoro. Ideally, it should go to last Pomodoro automatically. Something like:
Thanks! |
Maybe it's not perfect. This works for me. (defun org-pomodoro-prompt ()
(interactive)
(org-clock-goto)
(if (y-or-n-p "Start a new pomodoro?")
(progn
(org-pomodoro))))
(add-hook 'org-pomodoro-break-finished-hook 'org-pomodoro-prompt) |
I would love it if there was a variable in the package itself to allow autostart timer after break. |
I just modified the prompt function so now it doesn't switch buffers all of a sudden when your break ends. (defun my/org-pomodoro-restart ()
(interactive)
(when (y-or-n-p "Start a new pomodoro?")
(save-window-excursion
(org-clock-goto)
(org-pomodoro))))
(add-hook 'org-pomodoro-break-finished-hook 'my/org-pomodoro-restart) Also, if you want a minibuffer popup instead of a gui one, use the following instead (defun my/org-pomodoro-restart ()
(interactive)
(let ((use-dialog-box nil))
(when (y-or-n-p "Start a new pomodoro?")
(save-window-excursion
(org-clock-goto)
(org-pomodoro)))))
(add-hook 'org-pomodoro-break-finished-hook 'my/org-pomodoro-restart) |
It would be nice to get a prompt to start a new pomodoro after breaks. Thanks!
The text was updated successfully, but these errors were encountered: