mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 00:32:54 +00:00
org-clock.el (org-user-idle-seconds): Simplify.
* org-clock.el (org-user-idle-seconds): Simplify. Thanks to Nick Dokos for paving the way (all the way down).
This commit is contained in:
parent
725a6c6a3d
commit
f398b9ee53
|
@ -1009,15 +1009,9 @@ This routine returns a floating point number."
|
||||||
(cond
|
(cond
|
||||||
((eq system-type 'darwin)
|
((eq system-type 'darwin)
|
||||||
(org-mac-idle-seconds))
|
(org-mac-idle-seconds))
|
||||||
((and
|
((eq window-system 'x)
|
||||||
(eq window-system 'x)
|
(max (org-x11-idle-seconds) (org-emacs-idle-seconds)))
|
||||||
;; Check that x11idle exists
|
(t (org-emacs-idle-seconds))))
|
||||||
(eq (call-process-shell-command "command" nil nil nil "-v" "x11idle") 0)
|
|
||||||
;; Check that x11idle can retrieve the idle time
|
|
||||||
(eq (call-process-shell-command "x11idle" nil nil nil ) 0))
|
|
||||||
(org-x11-idle-seconds))
|
|
||||||
(t
|
|
||||||
(org-emacs-idle-seconds))))
|
|
||||||
|
|
||||||
(defvar org-clock-user-idle-seconds)
|
(defvar org-clock-user-idle-seconds)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue