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

Hard pomodoro: start a pomodoro on any open task #82

Open
ag91 opened this issue Sep 4, 2019 · 0 comments
Open

Hard pomodoro: start a pomodoro on any open task #82

ag91 opened this issue Sep 4, 2019 · 0 comments

Comments

@ag91
Copy link

ag91 commented Sep 4, 2019

Hi,

I liked you mode so much that I decided to automatically activate it any time I am editing an heading with a TODO.

This is what I have in my config:

(defun my/automatically-start-pomodoro () 
     (when (and
            (string-equal (ignore-errors (org-get-todo-state)) "TODO")
            (not (org-pomodoro-active-p)))
       (org-pomodoro)))
   (defun my/lock-screen ()
     (if (equalp system-type 'darwin) 
         (shell-command "pmset displaysleepnow")
       (shell-command "gnome-screensaver-command -l")))

   (defun my/toggle-hard-on ()
     (add-hook 'post-self-insert-hook 'my/automatically-start-pomodoro)      
     (add-hook 'org-pomodoro-finished-hook 'my/lock-screen))

Would be interesting to add that as a feature of your mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant