Add a function that returns the pomodoro state
This commit is contained in:
parent
fc2ebefa68
commit
83477573a1
16
+org.el
16
+org.el
|
@ -91,3 +91,19 @@
|
|||
:empty-lines 1)))
|
||||
;; Fix org-chef scraping
|
||||
(setq org-chef-prefer-json-ld t)
|
||||
;; Get the current state of org-pomodoro
|
||||
(defun bergheim/org-clock-status ()
|
||||
"Return the org time status - including any pomodoro activity"
|
||||
(if (and (featurep 'org-pomodoro) (org-pomodoro-active-p))
|
||||
(cl-case org-pomodoro-state
|
||||
(:pomodoro
|
||||
(format "%d min" (/ (org-pomodoro-remaining-seconds) 60)))
|
||||
(:short-break
|
||||
(format "Short break: %d min" (/ (org-pomodoro-remaining-seconds) 60)))
|
||||
(:long-break
|
||||
(format "Long break: %d min" (/ (org-pomodoro-remaining-seconds) 60)))
|
||||
(:overtime
|
||||
(format "Overtime! %d min" (/ (org-pomodoro-remaining-seconds) 60))))
|
||||
(if (org-clocking-p)
|
||||
(format "%s" (org-duration-from-minutes (org-clock-get-clocked-time)))
|
||||
"")))
|
||||
|
|
Loading…
Reference in New Issue