mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Refactor doom-modeline-update-file-icon.
This commit is contained in:
parent
a4ff475a11
commit
c4fe2fbfab
1 changed files with 3 additions and 1 deletions
|
@ -201,10 +201,12 @@ buffer where knowing the current project directory is important."
|
|||
(setq doom-modeline--buffer-file-icon
|
||||
(when (and doom-modeline-icon doom-modeline-major-mode-icon)
|
||||
(let* ((height (/ all-the-icons-scale-factor 1.3))
|
||||
(file (file-name-nondirectory (or buffer-file-name "")))
|
||||
(icon (if (and buffer-file-name
|
||||
(all-the-icons-match-to-alist buffer-file-name
|
||||
all-the-icons-icon-alist))
|
||||
(doom-modeline-icon-for-file buffer-file-name :height height)
|
||||
(unless (string-empty-p file)
|
||||
(doom-modeline-icon-for-file file :height height))
|
||||
(doom-modeline-icon-for-mode major-mode :height height))))
|
||||
(if (symbolp icon)
|
||||
(setq icon (doom-modeline-icon-faicon "file" :height height :v-adjust -0.0575)))
|
||||
|
|
Loading…
Reference in a new issue