Show currently clocked time as well
This commit is contained in:
parent
35fcc384cb
commit
15a506380e
11
config.el
11
config.el
@ -510,13 +510,18 @@ the inbox. Refile to any org-gtd incubate target (see manual)."
|
||||
"Form a clock string that will be shown in polybar."
|
||||
(require 'org-clock)
|
||||
(when (org-clocking-p)
|
||||
(let ((clocked-time (org-clock-get-clocked-time)))
|
||||
(let ((currently-clocked-time
|
||||
(floor (org-time-convert-to-integer
|
||||
(time-since org-clock-start-time))
|
||||
60))
|
||||
(clocked-time (org-clock-get-clocked-time)))
|
||||
(if org-clock-effort
|
||||
(let* ((effort-in-minutes (org-duration-to-minutes org-clock-effort))
|
||||
(current-work-done-str (org-duration-from-minutes currently-clocked-time))
|
||||
(work-done-str (org-duration-from-minutes clocked-time))
|
||||
(effort-str (org-duration-from-minutes effort-in-minutes)))
|
||||
(format "%s/%s %s"
|
||||
work-done-str effort-str org-clock-heading))
|
||||
(format "%s (%s/%s) %s"
|
||||
current-work-done-str work-done-str effort-str org-clock-heading))
|
||||
(format "%s %s"
|
||||
(org-duration-from-minutes clocked-time)
|
||||
org-clock-heading)))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user