mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Improve buffer icons.
This commit is contained in:
parent
027a6f4678
commit
1d176b856e
1 changed files with 9 additions and 8 deletions
|
@ -201,15 +201,16 @@ buffer where knowing the current project directory is important."
|
||||||
(setq doom-modeline--buffer-file-icon
|
(setq doom-modeline--buffer-file-icon
|
||||||
(when (and doom-modeline-icon doom-modeline-major-mode-icon)
|
(when (and doom-modeline-icon doom-modeline-major-mode-icon)
|
||||||
(let* ((height (/ all-the-icons-scale-factor 1.3))
|
(let* ((height (/ all-the-icons-scale-factor 1.3))
|
||||||
(file (file-name-nondirectory (or buffer-file-name "")))
|
(icon (if (and (buffer-file-name)
|
||||||
(icon (if (and buffer-file-name
|
(all-the-icons-auto-mode-match?))
|
||||||
(all-the-icons-match-to-alist buffer-file-name
|
(all-the-icons-icon-for-file (file-name-nondirectory (buffer-file-name))
|
||||||
all-the-icons-icon-alist))
|
:height height :v-adjust -0.05)
|
||||||
(unless (string-empty-p file)
|
(all-the-icons-icon-for-mode major-mode :height height :v-adjust -0.05))))
|
||||||
(doom-modeline-icon-for-file file :height height :v-adjust -0.05))
|
|
||||||
(doom-modeline-icon-for-mode major-mode :height height :v-adjust -0.05))))
|
|
||||||
(if (symbolp icon)
|
(if (symbolp icon)
|
||||||
(setq icon (doom-modeline-icon-faicon "file-o" :face 'all-the-icons-dsilver :height height :v-adjust -0.05)))
|
(setq icon (doom-modeline-icon-faicon "file-o"
|
||||||
|
:face 'all-the-icons-dsilver
|
||||||
|
:height height
|
||||||
|
:v-adjust -0.05)))
|
||||||
(unless (symbolp icon)
|
(unless (symbolp icon)
|
||||||
(propertize icon
|
(propertize icon
|
||||||
'help-echo (format "Major-mode: %s" (format-mode-line mode-name))
|
'help-echo (format "Major-mode: %s" (format-mode-line mode-name))
|
||||||
|
|
Loading…
Reference in a new issue