diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-11-02 22:04:57 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-11-02 22:04:57 +0100 |
commit | 93f6b53704a657a58a441cec2ed23eaa5f719393 (patch) | |
tree | 715a28eb322e9149ce01996fcd64f1f7c5fa8413 /.config | |
parent | 511be034b5f35cdec917214f60d4c0689436bae3 (diff) |
emacs: Work on modeline themeing
Diffstat (limited to '.config')
-rw-r--r-- | .config/emacs/mango-theme.el | 21 | ||||
-rw-r--r-- | .config/emacs/modules/mm-modeline.el | 27 |
2 files changed, 30 insertions, 18 deletions
diff --git a/.config/emacs/mango-theme.el b/.config/emacs/mango-theme.el index 231896a..a18b9ce 100644 --- a/.config/emacs/mango-theme.el +++ b/.config/emacs/mango-theme.el @@ -37,6 +37,7 @@ graphically, so I shouldn’t need to have multiple specs per face. (violet . "#E57AE5") (khaki . "#F0E68C") (lime . "#B8F182") + (dark-red . "#841A11") (orange . "#F1B282") (pink . "#ED97F5") (spanish-red . "#E60026")) @@ -84,6 +85,24 @@ graphically, so I shouldn’t need to have multiple specs per face. (font-lock-doc-face :inherit font-lock-comment-face) + ;; Modeline + (mm-modeline-readonly-face + :weight bold) + (mm-modeline-buffer-name-face + :inherit font-lock-constant-face) + (mm-modeline-buffer-modified-face + :inherit shadow) + (mm-modeline-major-mode-name-face + :weight bold) + (mm-modeline-major-mode-symbol-face + :inherit shadow) + (mm-modeline-narrow-face + :background ,(mango-theme--color 'dark-red) + :box ,(mango-theme--color 'dark-red) + :weight bold) + (mm-modeline-git-branch-face + :inherit font-lock-constant-face) + ;; Core Language (font-lock-keyword-face :foreground ,(mango-theme--color 'violet)) @@ -164,4 +183,4 @@ graphically, so I shouldn’t need to have multiple specs per face. :background ,(mango-theme--color 'middleground)) (tempel-form :slant italic - :background ,(mango-theme--color 'middleground))) + :background ,(mango-theme--color 'middleground)))
\ No newline at end of file diff --git a/.config/emacs/modules/mm-modeline.el b/.config/emacs/modules/mm-modeline.el index ce28d69..77be12e 100644 --- a/.config/emacs/modules/mm-modeline.el +++ b/.config/emacs/modules/mm-modeline.el @@ -3,20 +3,13 @@ (defmacro mm-modeline--define-component (name &rest forms) (declare (indent 1)) `(progn + (defface ,(intern (format "%s-face" name)) + '((t)) + ,(format "Face for the `%s' component." name)) (defvar-local ,name '(:eval (or ,(macroexp-progn forms) ""))) (put ',name 'risky-local-variable t))) -;;; Faces - -(defface mm-modeline-narrow-face - '((t :foreground "#C5C8C6" ; From ‘mango-theme’ - :background "dark red" - :box "dark red" - :weight bold)) - "Face for the `mm-modeline-narrow' modeline component.") - - ;;; Support Icons (use-package all-the-icons @@ -34,15 +27,15 @@ (mm-modeline--define-component mm-modeline-readonly (when buffer-read-only - (propertize " READONLY" 'face 'bold))) + (propertize " READONLY" 'face 'mm-modeline-readonly-face))) (mm-modeline--define-component mm-modeline-buffer-name - (propertize "%b" 'face 'font-lock-constant-face)) + (propertize "%b" 'face 'mm-modeline-buffer-name-face)) (mm-modeline--define-component mm-modeline-buffer-modified (when (and (buffer-modified-p) (buffer-file-name)) - (propertize " (modified)" 'face 'shadow))) + (propertize " (modified)" 'face 'mm-modeline-buffer-modified-face))) (defconst mm-modeline-mode-acronyms '("css" "csv" "gsp" "html" "json" "mhtml" "scss" "toml" "tsv") @@ -78,7 +71,7 @@ (upcase (substring string (match-beginning 0) (match-end 0))) (substring string (match-end 0) (length string))) string))) - 'face 'bold)) + 'face 'mm-modeline-major-mode-name-face)) (mm-modeline--define-component mm-modeline-major-mode-symbol (propertize @@ -88,7 +81,7 @@ ((derived-mode-p 'prog-mode) "λ ") ((derived-mode-p 'text-mode) "§ ") (t "")) - 'face 'shadow)) + 'face 'mm-modeline-major-mode-symbol-face)) (mm-modeline--define-component mm-modeline-narrow (when (buffer-narrowed-p) @@ -102,7 +95,7 @@ (concat (propertize "\uE907" 'display '(raise 0)) " " - (propertize branch 'face 'font-lock-constant-face) + (propertize branch 'face 'mm-modeline-git-branch-face) " │ "))) @@ -134,4 +127,4 @@ (setq-default mode-line-format (list mm-modeline-left mm-modeline-left-right-padding mm-modeline-right)) -(provide 'mm-modeline) +(provide 'mm-modeline)
\ No newline at end of file |