mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-30 11:09:55 +00:00
Hide buffer icons in inactive windows.
This commit is contained in:
parent
561560dfe5
commit
ab6ab18bc7
1 changed files with 33 additions and 29 deletions
|
@ -609,7 +609,8 @@ buffer where knowing the current project directory is important."
|
|||
'face face))))
|
||||
|
||||
;;
|
||||
(defvar-local doom-modeline-buffer-file-name "%b")
|
||||
(defvar-local doom-modeline-buffer-file-name
|
||||
(propertize "%b" 'face 'doom-modeline-buffer-file))
|
||||
(defun doom-modeline-update-buffer-file-name (&rest _)
|
||||
"Propertized variable `buffer-file-name' based on `doom-modeline-buffer-file-name-style'."
|
||||
(setq doom-modeline-buffer-file-name
|
||||
|
@ -639,7 +640,10 @@ buffer where knowing the current project directory is important."
|
|||
(doom-modeline-def-segment buffer-info
|
||||
"Combined information about the current buffer, including the current working
|
||||
directory, the file name, and its state (modified, read-only or non-existent)."
|
||||
(concat (cond (buffer-read-only
|
||||
(let ((active (doom-modeline--active)))
|
||||
(concat
|
||||
(when active
|
||||
(cond (buffer-read-only
|
||||
(concat (doom-modeline-icon-octicon
|
||||
"lock"
|
||||
:face 'doom-modeline-warning
|
||||
|
@ -663,10 +667,10 @@ directory, the file name, and its state (modified, read-only or non-existent)."
|
|||
"fold"
|
||||
:face 'doom-modeline-warning
|
||||
:v-adjust -0.05)
|
||||
" ")))
|
||||
(if (and (doom-modeline--active) buffer-file-name )
|
||||
" "))))
|
||||
(if (and active buffer-file-name)
|
||||
doom-modeline-buffer-file-name
|
||||
"%b")))
|
||||
(propertize "%b" 'face (if active 'doom-modeline-buffer-file))))))
|
||||
|
||||
(doom-modeline-def-segment buffer-info-simple
|
||||
"Display only the current buffer's name, but with fontification."
|
||||
|
|
Loading…
Reference in a new issue