;;; org.el -*- lexical-binding: t; -*- (defun max/org-clock-get-clock-string () "Form a clock string that will be shown in polybar. Adapted from `org-clock-get-clock-string'." (require 'org-clock) (when (org-clocking-p) (let* ((currently-clocked-time (floor (org-time-convert-to-integer (time-since org-clock-start-time)) 60)) (clocked-time (org-clock-get-clocked-time)) (current-work-done-str (org-duration-from-minutes currently-clocked-time))) (if org-clock-effort (let* ((effort-in-minutes (org-duration-to-minutes org-clock-effort)) (work-done-str (org-duration-from-minutes clocked-time)) (effort-str (org-duration-from-minutes effort-in-minutes))) (format "%s (%s/%s) %s" current-work-done-str work-done-str effort-str org-clock-heading)) (format "%s %s" current-work-done-str org-clock-heading))))) (after! org ;; Store org links to info pages (add-to-list 'org-modules 'ol-info)) (map! :after org :map org-mode-map :localleader "Y" #'ox-clip-image-to-clipboard)