From: Heime <heimeborgia@protonmail.com>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Introducing faces to mode-line-buffer-identification
Date: Tue, 30 Jul 2024 06:42:08 +0000 [thread overview]
Message-ID: <Z9fpnw9ScTzJSpLgiIDAnkosItH-tgZSwVlIYROIUtaoKHwzDLdVvzJGu8d8PFeQJ6TLv2aBnDQxSr-QGIIoje9IMwUiaoSMXds--PmpWa0=@protonmail.com> (raw)
I have two faces, one for the active and another for an inactive window.
(defface bfnap-facespk
`((t :background ,vodil-orange-red
:foreground ,vodil-white
:inherit mode-line-buffer-id))
"Face for the modeline buffer identification name.")
(defface inaktv-facespk
`((t :background ,vodil-dark-gray
:foreground ,vodil-light-gray))
"Face for displaying the Modeline in the Inactive Window.")
(defun bfnap-face ()
"Return the appropriate face for the mode line based on window
selection."
(if (mode-line-window-selected-p)
'bfnap-facespk
'inaktv-facespk))
I want to adapt this customisation of the modeline buffer identification
to use different background and foreground colours.
(setq-default mode-line-buffer-identification
`(:eval
(let* ( (bfnm (buffer-name (window-buffer)))
(tknm (if (> (length bfnm) ,wmax)
(vodilac-ellipses bfnm ,wmax ,actm)
bfnm)) )
(propertized-buffer-identification (format " %s " tknm))))))
next reply other threads:[~2024-07-30 6:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 6:42 Heime [this message]
2024-07-30 8:43 ` Introducing faces to mode-line-buffer-identification Heime
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='Z9fpnw9ScTzJSpLgiIDAnkosItH-tgZSwVlIYROIUtaoKHwzDLdVvzJGu8d8PFeQJ6TLv2aBnDQxSr-QGIIoje9IMwUiaoSMXds--PmpWa0=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).