Vladimir Nikishkin <lockyw...@gmail.com> writes:

> For some time I have been wondering why auto-clockout does not use
> x11idle on my machine.
> ...
> or, even better:
>
> #+begin_src elisp
> (defun org-clock-auto-clockout-maybe ()
>    (if (< org-clock-auto-clockout-timer (if org-x11idle-exists-p
>                                            (org-x11-idle-seconds)
>                                          (current-idle-time)))))
> (defun org-clock-auto-clockout-insinuate ()
>   "Set up hook for auto clocking out when Emacs is idle.
> See `org-clock-auto-clockout-timer'.
>
> This function is meant to be added to the user configuration."
>   (require 'org-clock)
>   (add-hook 'org-clock-in-hook #'org-clock-auto-clockout-maybe t)
>   (add-hook 'org-clock-out-hook (lambda ()
>        (cancel-function-timers 'org-clock-auto-clockout-maybe))))
> #+end_src

Makes sense.
Would you be interested to submit a patch?
See https://orgmode.org/worg/org-contribute.html

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to