Only display nyan and parrot in active windows.

This commit is contained in:
Vincent Zhang 2019-01-09 05:10:53 +08:00
parent 5b66d86bd9
commit 361f29e2cf

View file

@ -1727,7 +1727,8 @@ See `mode-line-percent-position'.")
(doom-modeline-column-zero-based " %l:%c" " %l:%C") (doom-modeline-column-zero-based " %l:%c" " %l:%C")
" %l") " %l")
(column-number-mode (doom-modeline-column-zero-based " :%c" " :%C"))))) (column-number-mode (doom-modeline-column-zero-based " :%c" " :%C")))))
(if (bound-and-true-p nyan-mode) (if (and (bound-and-true-p nyan-mode)
(doom-modeline--active))
(concat " " (nyan-create) " " (concat " " (nyan-create) " "
(propertize (format-mode-line lc) (propertize (format-mode-line lc)
'help-echo "Buffer position\n\ 'help-echo "Buffer position\n\
@ -1748,7 +1749,8 @@ mouse-1: Display Line and Column Mode Menu"
;; ;;
(doom-modeline-def-segment parrot (doom-modeline-def-segment parrot
"The party parrot animated icon. Requires `parrot-mode' to be enabled." "The party parrot animated icon. Requires `parrot-mode' to be enabled."
(when (bound-and-true-p parrot-mode) (when (and (bound-and-true-p parrot-mode)
(doom-modeline--active))
(concat " " (parrot-create) " "))) (concat " " (parrot-create) " ")))
;; ;;