ui/modeline: fontify project root separately
And add new doom-modeline-buffer-project-root face.
This commit is contained in:
parent
4dfb84211b
commit
6282526743
1 changed files with 9 additions and 2 deletions
|
@ -71,6 +71,11 @@ buffers.")
|
||||||
"Face used for the filename part of the mode-line buffer path."
|
"Face used for the filename part of the mode-line buffer path."
|
||||||
:group '+modeline)
|
:group '+modeline)
|
||||||
|
|
||||||
|
(defface doom-modeline-buffer-project-root
|
||||||
|
'((t (:inherit doom-modeline-buffer-path)))
|
||||||
|
"Face used for the project root at the beginning of the mode-line path."
|
||||||
|
:group '+modeline)
|
||||||
|
|
||||||
(defface doom-modeline-buffer-modified '((t (:inherit (error bold) :background nil)))
|
(defface doom-modeline-buffer-modified '((t (:inherit (error bold) :background nil)))
|
||||||
"Face used for the 'unsaved' symbol in the mode-line."
|
"Face used for the 'unsaved' symbol in the mode-line."
|
||||||
:group '+modeline)
|
:group '+modeline)
|
||||||
|
@ -242,9 +247,11 @@ buffers.")
|
||||||
'face 'doom-modeline-buffer-path))
|
'face 'doom-modeline-buffer-path))
|
||||||
((let* ((true-filename (file-truename buffer-file-name))
|
((let* ((true-filename (file-truename buffer-file-name))
|
||||||
(relative-dirs (file-relative-name (file-name-directory true-filename)
|
(relative-dirs (file-relative-name (file-name-directory true-filename)
|
||||||
(concat root "../"))))
|
root)))
|
||||||
(if (equal "./" relative-dirs) (setq relative-dirs ""))
|
(if (equal "./" relative-dirs) (setq relative-dirs ""))
|
||||||
(concat (propertize relative-dirs
|
(concat (propertize (concat (doom-project-name) "/")
|
||||||
|
'face 'doom-modeline-buffer-project-root)
|
||||||
|
(propertize relative-dirs
|
||||||
'face 'doom-modeline-buffer-path)
|
'face 'doom-modeline-buffer-path)
|
||||||
(propertize (file-name-nondirectory true-filename)
|
(propertize (file-name-nondirectory true-filename)
|
||||||
'face 'doom-modeline-buffer-file)))))))
|
'face 'doom-modeline-buffer-file)))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue