summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcashmere <cashmere1337@riseup.net>2026-09-22 13:05:14 +0200
committercashmere <cashmere1337@riseup.net>2026-09-22 13:05:14 +0200
commit26387724eb6cf7968c12a98e837d3e8c06f90509 (patch)
tree06716d2e9673fea5a86aa119b8b7a7e806a9849f
parenta8ff260c08a3dfd84b5f7d1461551efef202494d (diff)
downloademacs-26387724eb6cf7968c12a98e837d3e8c06f90509.tar.gz
relic: 2026-09-22T13:05:18+02:00
-rw-r--r--config.el1
-rw-r--r--config.org1
-rw-r--r--lisp/my-header-line.el25
3 files changed, 24 insertions, 3 deletions
diff --git a/config.el b/config.el
index 85be5c7..18a5d07 100644
--- a/config.el
+++ b/config.el
@@ -3034,6 +3034,7 @@ BODY is the xonsh script. PARAMS may include :dir and :cmdline."
:ensure (:host github :repo "rougier/mode-line-maker")
:config
(require 'my-header-line)
+ (setq my/header-line-badge-icon "nf-md-lambda")
(my/header-line-install))
(use-package adaptive-wrap
diff --git a/config.org b/config.org
index cc1e8a5..dd1fd98 100644
--- a/config.org
+++ b/config.org
@@ -3651,6 +3651,7 @@ Native =undo-redo= (via =evil-undo-system='undo-redo=); just raise the undo limi
:ensure (:host github :repo "rougier/mode-line-maker")
:config
(require 'my-header-line)
+ (setq my/header-line-badge-icon "nf-md-lambda")
(my/header-line-install))
#+end_src
diff --git a/lisp/my-header-line.el b/lisp/my-header-line.el
index fdce633..cbe1285 100644
--- a/lisp/my-header-line.el
+++ b/lisp/my-header-line.el
@@ -70,13 +70,24 @@ Matches the default height of Dirvish's full-frame header line."
"Quiet face for the scroll percentage and cursor position.")
(defface my/header-line-workspace-active-face
- '((t (:inherit my/header-line-position-face :inverse-video nil :box nil)))
- "Current workspace, styled like the percentage and cursor position.")
+ '((t (:inherit font-lock-keyword-face :weight normal :inverse-video nil :box nil)))
+ "Theme keyword accent for the current workspace, matching the Evil state tag.")
(defface my/header-line-workspace-inactive-face
'((t (:inherit shadow :weight normal :slant normal)))
"Quiet numbers for other open workspaces.")
+(defface my/header-line-badge-face
+ '((t (:inherit font-lock-function-name-face :weight normal)))
+ "Theme function accent for the personal badge icon.")
+
+(defcustom my/header-line-badge-icon nil
+ "Nerd icon shown at the very start of the header line.
+A Material Design icon name as understood by `nerd-icons-mdicon',
+for example \"nf-md-hexagon_outline\". Nil hides the segment."
+ :type '(choice (const :tag "No badge" nil) (string :tag "Icon name"))
+ :group 'mode-line)
+
(defvar my/header-line-workspaces-expanded nil
"Whether the header line also shows the other open workspaces.")
@@ -162,6 +173,13 @@ the project root, falling back to the plain buffer name."
(face (or (nth 2 entry) 'my/header-line-evil-normal)))
(propertize (format " %s " tag) 'face face))))
+(defun my/header-line-badge ()
+ "Render `my/header-line-badge-icon', or nothing when it is unset."
+ (if my/header-line-badge-icon
+ (concat " " (my/header-line--icon my/header-line-badge-icon
+ 'my/header-line-badge-face))
+ ""))
+
(defun my/header-line-buffer-state ()
"Render a clean lock, edit, or saved indicator for the current buffer."
(cond
@@ -356,7 +374,8 @@ headings, remain visible."
(list
'(:eval (my/header-line--height-spacer))
(my/header-line--make
- '((:eval (my/header-line-evil-state)) " "
+ '((:eval (my/header-line-badge))
+ (:eval (my/header-line-evil-state)) " "
(:eval (my/header-line-buffer-state))
(:eval (my/header-line-remote)) " "
(:eval (my/header-line-buffer-icon)) " "