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-close-button "✕"
|
||||||
centaur-tabs-modified-marker "⬤")
|
centaur-tabs-modified-marker "⬤")
|
||||||
(leader-def-key "uT" #'centaur-tabs-mode)
|
(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)
|
(centaur-tabs-mode)
|
||||||
:config
|
:config
|
||||||
(centaur-tabs-group-by-projectile-project)
|
(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
|
:general
|
||||||
((normal motion visual) "g t" #'centaur-tabs-forward)
|
((normal motion visual) "g t" #'centaur-tabs-forward)
|
||||||
((normal motion visual) "g T" #'centaur-tabs-backward)
|
((normal motion visual) "g T" #'centaur-tabs-backward)
|
||||||
:hook
|
:hook
|
||||||
(imenu-list-major-mode . disable-centaur-tabs)
|
(git-commit-mode . (lambda ()
|
||||||
(dashboard-mode . disable-centaur-tabs)
|
(when (centaur-tabs-mode-on-p)
|
||||||
(git-commit-mode . disable-centaur-tabs)
|
(centaur-tabs-local-mode)))))
|
||||||
(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))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Frame parameters
|
* Frame parameters
|
||||||
|
Loading…
Reference in New Issue
Block a user