diff --git a/emacs/init.org b/emacs/init.org index 30e43d9..3f2046e 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -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