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:
parent
454bcf4bbd
commit
ba231c8a41
35
init.el
35
init.el
@ -333,12 +333,35 @@
|
|||||||
:init (setq server-log t))
|
:init (setq server-log t))
|
||||||
|
|
||||||
(use-package tab-bar
|
(use-package tab-bar
|
||||||
:init (setq tab-bar-show t
|
:init (setopt tab-bar-show t
|
||||||
tab-bar-format '(tab-bar-format-tabs
|
tab-bar-tab-hints t
|
||||||
tab-bar-separator
|
tab-bar-close-button-show nil
|
||||||
;; tab-bar-format-align-right
|
tab-bar-new-button-show nil
|
||||||
;; current-time-string
|
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
|
(use-package undo-tree
|
||||||
:ensure t
|
:ensure t
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user