mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Hide checker segment when disabled/empty
For buffers that don't have either mode enabled or a valid checker present.
This commit is contained in:
parent
5f9d9a2e48
commit
386000d47f
1 changed files with 25 additions and 23 deletions
|
@ -831,29 +831,31 @@ icons."
|
||||||
`(,doom-modeline--flymake-icon . ,doom-modeline--flymake-text))
|
`(,doom-modeline--flymake-icon . ,doom-modeline--flymake-text))
|
||||||
((bound-and-true-p flycheck-mode)
|
((bound-and-true-p flycheck-mode)
|
||||||
`(,doom-modeline--flycheck-icon . ,doom-modeline--flycheck-text)))))
|
`(,doom-modeline--flycheck-icon . ,doom-modeline--flycheck-text)))))
|
||||||
(let ((icon (car seg))
|
(if seg
|
||||||
(text (cdr seg)))
|
(let ((icon (car seg))
|
||||||
(concat
|
(text (cdr seg)))
|
||||||
(propertize (if vc-mode " " " ")
|
(concat
|
||||||
'face (if active 'mode-line 'mode-line-inactive))
|
(propertize (if vc-mode " " " ")
|
||||||
(if active
|
'face (if active 'mode-line 'mode-line-inactive))
|
||||||
(concat icon
|
(if active
|
||||||
(when (and icon text) doom-modeline-vspc)
|
(concat icon
|
||||||
text)
|
(when (and icon text) doom-modeline-vspc)
|
||||||
(concat
|
text)
|
||||||
(when icon
|
(concat
|
||||||
(propertize icon
|
(when icon
|
||||||
'face
|
(propertize icon
|
||||||
(if doom-modeline-icon
|
'face
|
||||||
`(:height
|
(if doom-modeline-icon
|
||||||
,(doom-modeline-icon-height 1.3)
|
`(:height
|
||||||
:family
|
,(doom-modeline-icon-height 1.3)
|
||||||
,(all-the-icons-icon-family icon)
|
:family
|
||||||
:inherit mode-line-inactive)
|
,(all-the-icons-icon-family icon)
|
||||||
'mode-line-inactive)))
|
:inherit mode-line-inactive)
|
||||||
(when (and icon text) doom-modeline-inactive-vspc)
|
'mode-line-inactive)))
|
||||||
(when text (propertize text 'face 'mode-line-inactive))))
|
(when (and icon text) doom-modeline-inactive-vspc)
|
||||||
(propertize " " 'face (if active 'mode-line 'mode-line-inactive))))))
|
(when text (propertize text 'face 'mode-line-inactive))))
|
||||||
|
(propertize " " 'face (if active 'mode-line 'mode-line-inactive))))
|
||||||
|
"")))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue