* Modeline face for inactive buffer
@ 2024-07-20 16:15 Heime
2024-07-20 16:34 ` Emanuel Berg
0 siblings, 1 reply; 2+ messages in thread
From: Heime @ 2024-07-20 16:15 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
I am setting mode-line-format, but want that the face
for an inactive buffer affects both the buffer name
and the major-mode name.
Currently, for the inactive name the face for the
"%l:%c" part has some sort of blue hue. What I
would like to have is a the face that shows up
for the buffer name (gray on gray).
(defun vodil-name-format ()
(format " %s " (buffer-name)))
(defvar-local vodil-name
'(:eval
(let ( (vodil-face
(if (mode-line-window-selected-p)
'vodil-active-face
'vodil-inactive-face)) )
(propertize (vodil-name-format)
'face vodil-face))))
(put 'vodil-name 'risky-local-variable t)
(defun vodil-mode-name ()
(capitalize (symbol-name major-mode)))
(defvar-local vodil-mode
'(:eval
(when (mode-line-window-selected-p)
(list
(propertize "λ" 'face 'bold)
" "
(propertize (vodil-mode-name) 'face 'bold)))))
(put 'vodil-mode 'risky-local-variable t)
(defun vodil-primitive ()
(setq-default mode-line-format
'("%e" vodil-name " " vodil-mode " " "%l:%c")))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Modeline face for inactive buffer
2024-07-20 16:15 Modeline face for inactive buffer Heime
@ 2024-07-20 16:34 ` Emanuel Berg
0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg @ 2024-07-20 16:34 UTC (permalink / raw)
To: help-gnu-emacs
Heime wrote:
> I am setting mode-line-format, but want that the face for an
> inactive buffer affects both the buffer name and the
> major-mode name.
>
> Currently, for the inactive name the face for the "%l:%c"
> part has some sort of blue hue. What I would like to have is
> a the face that shows up for the buffer name (gray on gray).
See faces:
mode-line
mode-line-active
mode-line-buffer-id
mode-line-emphasis
mode-line-highlight
mode-line-inactive
They have foreground, background, weight, and other attributes.
You can experiment by setting the attributes to 'unspecified
or 'default.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-20 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-20 16:15 Modeline face for inactive buffer Heime
2024-07-20 16:34 ` Emanuel Berg
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.