Configure centaur tabs to only show tabs in buffers visiting files
This commit is contained in:
parent
5ed91f08eb
commit
a10d31c7aa
@ -2147,26 +2147,22 @@ UI-related keybindings:
|
||||
centaur-tabs-close-button "✕"
|
||||
centaur-tabs-modified-marker "⬤")
|
||||
(leader-def-key "uT" #'centaur-tabs-mode)
|
||||
(defun disable-centaur-tabs ()
|
||||
"Disables centaur-tabs in current buffer"
|
||||
(interactive)
|
||||
(when (centaur-tabs-mode-on-p)
|
||||
(centaur-tabs-local-mode)))
|
||||
(centaur-tabs-mode)
|
||||
:config
|
||||
(centaur-tabs-group-by-projectile-project)
|
||||
;; Only show tabs in buffers visiting files
|
||||
(advice-add 'centaur-tabs-line :around
|
||||
(lambda (oldfn &rest args)
|
||||
(if (buffer-file-name)
|
||||
(apply oldfn args)
|
||||
(setq header-line-format nil))))
|
||||
:general
|
||||
((normal motion visual) "g t" #'centaur-tabs-forward)
|
||||
((normal motion visual) "g T" #'centaur-tabs-backward)
|
||||
:hook
|
||||
(imenu-list-major-mode . disable-centaur-tabs)
|
||||
(dashboard-mode . disable-centaur-tabs)
|
||||
(git-commit-mode . disable-centaur-tabs)
|
||||
(eshell-mode . disable-centaur-tabs)
|
||||
(vterm-mode . disable-centaur-tabs)
|
||||
(shell-mode . disable-centaur-tabs)
|
||||
(term-mode . disable-centaur-tabs)
|
||||
(inferior-python-mode . disable-centaur-tabs))
|
||||
(git-commit-mode . (lambda ()
|
||||
(when (centaur-tabs-mode-on-p)
|
||||
(centaur-tabs-local-mode)))))
|
||||
#+END_SRC
|
||||
|
||||
* Frame parameters
|
||||
|
Loading…
Reference in New Issue
Block a user