Reduce display information in tab-bar

Inspired by https://www.rahuljuliato.com/posts/emacs-tab-bar-groups, not aiming at replacing my tmux
workflow, though.
This commit is contained in:
Daniel Borchmann 2025-06-28 17:28:02 +02:00
parent 454bcf4bbd
commit ba231c8a41
No known key found for this signature in database
GPG Key ID: 50EA937BF472ADD1

35
init.el
View File

@ -333,12 +333,35 @@
:init (setq server-log t))
(use-package tab-bar
:init (setq tab-bar-show t
tab-bar-format '(tab-bar-format-tabs
tab-bar-separator
;; tab-bar-format-align-right
;; current-time-string
)))
:init (setopt tab-bar-show t
tab-bar-tab-hints t
tab-bar-close-button-show nil
tab-bar-new-button-show nil
tab-bar-auto-width nil
tab-bar-separator " | "
tab-bar-format '(tab-bar-format-tabs-groups
tab-bar-separator))
:config (progn
;; Two display overrides inspired by
;; https://www.rahuljuliato.com/posts/emacs-tab-bar-groups.
(define-advice tab-bar-tab-name-format-hints (:around
(orig-fun name tab idx)
only-show-tab-number)
(ignore orig-fun tab)
(if tab-bar-tab-hints
(format "[%d]" idx)
name))
(define-advice tab-bar-tab-group-format-default (:around
(orig-fun tab idx &optional currentp)
only-show-group-name)
(ignore orig-fun idx)
(propertize (funcall tab-bar-tab-group-function tab)
'face (if currentp
'tab-bar-tab-group-current
'tab-bar-tab-group-inactive)))))
(use-package undo-tree
:ensure t