diff options
author | Vincent Ambo <tazjin@gmail.com> | 2018-06-14T23·14+0200 |
---|---|---|
committer | Vincent Ambo <tazjin@gmail.com> | 2018-06-14T23·15+0200 |
commit | 454cb9e5065f84e82b435794f3b59e743846630f (patch) | |
tree | fa61560e39c242c0832600c371fbd6d31f3894e6 | |
parent | e543ddff2e56571a60919ca041ce54523c55847b (diff) |
feat(look-and-feel): Display unread mail telephone line segment
Defines a new highlight face and configures the telephone line segments to display the unread count if there are unread mails.
-rw-r--r-- | init.el | 2 | ||||
-rw-r--r-- | init/look-and-feel.el | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/init.el b/init.el index 5cbf5cd92fad..b73eaccef508 100644 --- a/init.el +++ b/init.el @@ -27,6 +27,7 @@ ;; After initialisation, proceed to load configuration that requires packages: (defun load-other-settings () (mapc 'require '(nixos + mail-setup look-and-feel functions settings @@ -37,7 +38,6 @@ haskell-setup rust-setup lisp-setup - mail-setup ))) (add-hook 'after-init-hook 'load-other-settings) diff --git a/init/look-and-feel.el b/init/look-and-feel.el index e12e62662ab2..63a3c1e3f80e 100644 --- a/init/look-and-feel.el +++ b/init/look-and-feel.el @@ -42,20 +42,26 @@ The idea is to not display information like the current time, load, battery levels in all buffers." - (if (bottom-right-window-p) - (telephone-line-raw mode-line-misc-info t) - "")) + (when (bottom-right-window-p) + (telephone-line-raw mode-line-misc-info t))) (telephone-line-defsegment telephone-line-last-window-segment () (telephone-misc-if-last-window)) +;; Define a highlight font for ~ important ~ information in the last +;; window. +(defface special-highlight '((t (:foreground "white" :background "#5f627f"))) "") +(add-to-list 'telephone-line-faces + '(highlight . (special-highlight . special-highlight))) + (setq telephone-line-lhs '((nil . (telephone-line-position-segment)) (accent . (telephone-line-buffer-segment)))) (setq telephone-line-rhs '((accent . (telephone-line-major-mode-segment)) - (nil . (telephone-line-last-window-segment)))) + (nil . (telephone-line-last-window-segment)) + (highlight . (telephone-line-notmuch-counts)))) (setq telephone-line-primary-left-separator 'telephone-line-tan-left telephone-line-primary-right-separator 'telephone-line-tan-right |