marcinkoziej/org-pomodoro

add a function to show org-pomodoro in the mode-line.

stardiviner opened this issue · 3 comments

I hope to have org-pomodoro can show timer in the mode-line. (and function can work in a custom mode-line with (:propertize (:eval (org-pomodoro-mode-line))). )

leoc commented

Could you elaborate, please? I do not really understand. 👍

Currently the mode line shows the pomodoro timer.

I customized my mode-line, like this:

(setq-default mode-line-format
              (quote
               (                
                ;; Org-mode clock
                (:propertize
                 (t org-mode-line-string)
                 ;; (t org-mode-line-string org-timer-mode-line-string)
                 face (:foreground "cyan" :weight 'bold)
                 )

                (:propertize mode-line-end-spaces)
                )))

I need to add org-pomodoro timer into my custom mode-line.

leoc commented

org-pomodoro uses the 'global-mode-string variable to alter the mode line.

  ;; add the org-pomodoro-mode-line to the global-mode-string
  (unless global-mode-string (setq global-mode-string '("")))
  (unless (memq 'org-pomodoro-mode-line global-mode-string)
    (setq global-mode-string (append global-mode-string
                                     '(org-pomodoro-mode-line))))

Maybe you can incorporate this in your custom mode line configuration?

For reference: http://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Variables.html