summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-12-30 12:33:44 +0800
committerJSDurand <mmemmew@gmail.com>2022-12-30 12:33:44 +0800
commitb6a8d5d653c15437c7c3e8a580e00c4770e4124b (patch)
tree7777317e90f454e8f149d8bb424cdbbc03b62e05
parent17043258090a6b63516378e4bf5a5e2ba351870c (diff)
modeline: adapt the face once again
* modeline.el (modeline-dashboard-format-right, durand-major-global-mode) (modeline-format-major-mode): Tried some tricks, but I still use a white color in the end.
-rw-r--r--modeline.el26
1 files changed, 17 insertions, 9 deletions
diff --git a/modeline.el b/modeline.el
index 683b09d..4fda761 100644
--- a/modeline.el
+++ b/modeline.el
@@ -71,7 +71,8 @@
(defun modeline-dashboard-format-right ()
"The right part of the mode line for the dashboard."
(declare (side-effect-free t) (pure t))
- (let ((face (cond ((modeline-active-window-p) 'doom-modeline-buffer-major-mode)
+ (let ((face (cond ((modeline-active-window-p)
+ 'durand-major-global-mode)
('mode-line-inactive))))
(concat
(modeline-propertize
@@ -477,25 +478,32 @@ This will be displayed in the mode line."
"/Users/durand/elisp_packages/protesilaos/modus-themes/")
(&rest body) t)
+(defface durand-major-global-mode
+ (modus-themes-with-colors
+ (list
+ (list
+ '((class color) (min-colors 256))
+ :inherit 'mode-line-active)))
+ "The face used for displaying the major mode and the global mode
+string in the mode line.")
+
;;;###autoload
(defun modeline-format-major-mode ()
"The major mode to display in the mode line."
(declare (pure t) (side-effect-free t))
- (let ((face (cond ((modeline-active-window-p) 'mode-line-active)
- ('mode-line-inactive)))
- (mode-string-face
- (cond
- ((modeline-active-window-p) 'mode-line-active)
- ('mode-line-inactive))))
+ (let ((face (cond ((modeline-active-window-p)
+ 'durand-major-global-mode)
+ ('mode-line-inactive))))
(concat
(modeline-propertize
(format-mode-line '("%m") face)
nil
- "Major mode\nmouse-1: Display major mode menu\nmouse-2: Show help for major mode\nmouse-3: Toggle minor modes"
+ "Major mode\nmouse-1: Display major mode menu\nmouse-2:\
+ Show help for major mode\nmouse-3: Toggle minor modes"
mode-line-major-mode-keymap)
(modeline-spc)
(modeline-propertize
- (format-mode-line global-mode-string mode-string-face))
+ (format-mode-line global-mode-string face))
(modeline-spc))))
;;;; VCS