diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2026-02-26 12:37:03 +0100 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2026-02-26 12:37:03 +0100 |
| commit | e0781c47e1b35694980b7bd0441cbe3c1b68e387 (patch) | |
| tree | 7aac2b66d29cb023b01e92e0cfdbf79c6f4db10a /.config | |
| parent | 5570aea502f30121b7c439c04f4e139883fe17ac (diff) | |
emacs: Support overwrite-mode in the modeline
Diffstat (limited to '.config')
| -rw-r--r-- | .config/emacs/mango-theme.el | 4 | ||||
| -rw-r--r-- | .config/emacs/modules/mm-modeline.el | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/.config/emacs/mango-theme.el b/.config/emacs/mango-theme.el index a18b9ce..5fec2e0 100644 --- a/.config/emacs/mango-theme.el +++ b/.config/emacs/mango-theme.el @@ -86,6 +86,8 @@ graphically, so I shouldn’t need to have multiple specs per face. :inherit font-lock-comment-face) ;; Modeline + (mm-modeline-overwrite-face + :weight bold) (mm-modeline-readonly-face :weight bold) (mm-modeline-buffer-name-face @@ -183,4 +185,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)))
\ No newline at end of file + :background ,(mango-theme--color 'middleground))) diff --git a/.config/emacs/modules/mm-modeline.el b/.config/emacs/modules/mm-modeline.el index 57f464d..dcda463 100644 --- a/.config/emacs/modules/mm-modeline.el +++ b/.config/emacs/modules/mm-modeline.el @@ -25,6 +25,10 @@ ;;; Modeline Components +(mm-modeline--define-component mm-modeline-overwrite + (when overwrite-mode + (propertize " OVERWRITE" 'face 'mm-modeline-overwrite-face))) + (mm-modeline--define-component mm-modeline-readonly (when buffer-read-only (propertize " READONLY" 'face 'mm-modeline-readonly-face))) @@ -124,6 +128,7 @@ the text it should be mapped to.") (setq mm-modeline-left (list mm-modeline-narrow + mm-modeline-overwrite mm-modeline-readonly " " mm-modeline-buffer-name @@ -139,4 +144,4 @@ the text it should be mapped to.") (setq-default mode-line-format (list mm-modeline-left mm-modeline-left-right-padding mm-modeline-right)) -(provide 'mm-modeline)
\ No newline at end of file +(provide 'mm-modeline) |