Commits

Anonymous committed 750b894

Move status from org to general

  • Participants
  • Parent commits 4bb08f3

Comments (0)

Files changed (2)

files/org-defs.el

   (org-show-subtree)
   (org-cycle-hide-drawers t))
 
-(defun my-org-status ()
-  (cond
-   ((not (marker-buffer org-clock-marker))
-    "<fc=#d3d7cf>-:--</fc>")
-   (t
-    (let* ((status (substring-no-properties org-mode-line-string 1
-                                            (1- (length org-mode-line-string))))
-           (split-status (split-string status " (")))
-      (concat "<fc=#8ae234>" (car split-status) "</fc>")))))
-
 (defun my-org-export-read-books-do-export (buf)
   "Buf is the buffer into which the export is written."
   (let ((index 0))

site-lisp/defuns.el

                   (search-forward "\t" nil t)
                   (backward-char)
                   (insert ", " plural))))))))))
+
+(defun my-emacs-status ()
+  (let ((org-active-task (cond
+                          ((not (marker-buffer org-clock-marker))
+                           "<fc=#d3d7cf>-:--</fc>")
+                          (t
+                           (let* ((status (substring-no-properties org-mode-line-string 1
+                                                                   (1- (length org-mode-line-string))))
+                                  (split-status (split-string status " (")))
+                             (concat "<fc=#8ae234>" (car split-status) "</fc>")))))
+        (unread-mail-count (let ((count (notmuch-unread-count)))
+                             (if (> count 0) (format "<fc=#ef2929>[✉ %d]</fc>" count) ""))))
+    (concat unread-mail-count org-active-task)))