mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Format codes.
This commit is contained in:
parent
4befbbbdce
commit
24d30ccc1e
2 changed files with 30 additions and 44 deletions
|
@ -79,7 +79,8 @@ Example: 'doom-modeline-env--ruby")
|
|||
(add-hook 'find-file-hook #'doom-modeline-update-env)
|
||||
(with-no-warnings
|
||||
(if (boundp 'after-focus-change-function)
|
||||
(add-function :after after-focus-change-function
|
||||
(add-function
|
||||
:after after-focus-change-function
|
||||
(lambda ()
|
||||
(if (frame-focus-state)
|
||||
(doom-modeline-update-env))))
|
||||
|
|
|
@ -202,10 +202,8 @@ buffer where knowing the current project directory is important."
|
|||
(concat
|
||||
(if active
|
||||
icon
|
||||
(propertize icon 'face `(:inherit
|
||||
,(get-text-property 0 'face icon)
|
||||
:inherit
|
||||
mode-line-inactive)))
|
||||
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
|
||||
:inherit mode-line-inactive)))
|
||||
(doom-modeline-spc)))
|
||||
(propertize (abbreviate-file-name default-directory)
|
||||
'face (if active
|
||||
|
@ -358,7 +356,8 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
|
|||
|
||||
(with-no-warnings
|
||||
(if (boundp 'after-focus-change-function)
|
||||
(add-function :after after-focus-change-function
|
||||
(add-function
|
||||
:after after-focus-change-function
|
||||
(lambda ()
|
||||
(when (frame-focus-state)
|
||||
(doom-modeline-update-buffer-file-name))))
|
||||
|
@ -385,15 +384,11 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
|
|||
(if (doom-modeline--active)
|
||||
(if doom-modeline-major-mode-color-icon
|
||||
icon
|
||||
(propertize icon 'face `(:inherit
|
||||
,(let ((props (get-text-property 0 'face icon)))
|
||||
(propertize icon 'face `(:inherit ,(let ((props (get-text-property 0 'face icon)))
|
||||
props (remove :inherit props))
|
||||
:inherit
|
||||
mode-line)))
|
||||
(propertize icon 'face `(:inherit
|
||||
,(get-text-property 0 'face icon)
|
||||
:inherit
|
||||
mode-line-inactive)))
|
||||
:inherit mode-line)))
|
||||
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
|
||||
:inherit mode-line-inactive)))
|
||||
(doom-modeline-vspc))))))
|
||||
|
||||
(defsubst doom-modeline--buffer-state-icon ()
|
||||
|
@ -404,10 +399,8 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
|
|||
(concat
|
||||
(if (doom-modeline--active)
|
||||
icon
|
||||
(propertize icon 'face `(:inherit
|
||||
,(get-text-property 0 'face icon)
|
||||
:inherit
|
||||
mode-line-inactive)))
|
||||
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
|
||||
:inherit mode-line-inactive)))
|
||||
(doom-modeline-vspc)))))
|
||||
|
||||
(defsubst doom-modeline--buffer-name ()
|
||||
|
@ -636,10 +629,8 @@ Uses `all-the-icons-octicon' to fetch the icon."
|
|||
(doom-modeline-spc)
|
||||
(if active
|
||||
icon
|
||||
(propertize icon 'face `(:inherit
|
||||
,(get-text-property 0 'face icon)
|
||||
:inherit
|
||||
mode-line-inactive)))
|
||||
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
|
||||
:inherit mode-line-inactive)))
|
||||
(if doom-modeline-icon (doom-modeline-vspc))
|
||||
(if active
|
||||
text
|
||||
|
@ -964,10 +955,8 @@ mouse-1: List all problems%s"
|
|||
(when icon
|
||||
(if active
|
||||
icon
|
||||
(propertize icon 'face `(:inherit
|
||||
,(get-text-property 0 'face icon)
|
||||
:inherit
|
||||
mode-line-inactive))))
|
||||
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
|
||||
:inherit mode-line-inactive))))
|
||||
(when (and doom-modeline-icon icon text)
|
||||
(doom-modeline-vspc))
|
||||
(when text
|
||||
|
@ -1732,10 +1721,8 @@ mouse-3: Reconnect to server" nick (eglot--major-mode server)))
|
|||
(doom-modeline-spc)
|
||||
(if active
|
||||
icon
|
||||
(propertize icon 'face `(:inherit
|
||||
,(get-text-property 0 'face icon)
|
||||
:inherit
|
||||
mode-line-inactive)))
|
||||
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
|
||||
:inherit mode-line-inactive)))
|
||||
(doom-modeline-spc))))))
|
||||
|
||||
(defun doom-modeline-override-eglot-modeline ()
|
||||
|
@ -2115,8 +2102,7 @@ we don't want to remove that so we just return the original."
|
|||
(doom-modeline-spc)
|
||||
(if percent-str
|
||||
(concat
|
||||
(propertize icon 'face `(:inherit
|
||||
,(get-text-property 0 'face icon)
|
||||
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
|
||||
:inherit ,face)
|
||||
'help-echo help-echo)
|
||||
(if doom-modeline-icon (doom-modeline-vspc))
|
||||
|
@ -2170,8 +2156,7 @@ we don't want to remove that so we just return the original."
|
|||
(if doom-modeline-major-mode-color-icon
|
||||
props
|
||||
(remove :inherit props)))
|
||||
:inherit
|
||||
mode-line-inactive))))))
|
||||
:inherit mode-line-inactive))))))
|
||||
(let ((info (format-mode-line 'mode-line-buffer-identification)))
|
||||
(if active
|
||||
info
|
||||
|
|
Loading…
Reference in a new issue