The hooks on `+doom-dashboard-mode-hook` and `+popup-buffer-mode-hook` will throw an error if centaur-tabs-mode is disabled, which may be the case if the user disables it interactively, post-startup. Fix #5196
26 lines
912 B
EmacsLisp
26 lines
912 B
EmacsLisp
;;; ui/tabs/config.el -*- lexical-binding: t; -*-
|
|
|
|
(use-package! centaur-tabs
|
|
:hook (doom-first-file . centaur-tabs-mode)
|
|
:init
|
|
(setq centaur-tabs-set-icons t
|
|
centaur-tabs-gray-out-icons 'buffer
|
|
centaur-tabs-set-bar 'left
|
|
centaur-tabs-set-modified-marker t
|
|
centaur-tabs-close-button "✕"
|
|
centaur-tabs-modified-marker "•"
|
|
;; Scrolling (with the mouse wheel) past the end of the tab list
|
|
;; replaces the tab list with that of another Doom workspace. This
|
|
;; prevents that.
|
|
centaur-tabs-cycle-scope 'tabs)
|
|
|
|
:config
|
|
(add-hook! '(+doom-dashboard-mode-hook +popup-buffer-mode-hook)
|
|
(defun +tabs-disable-centaur-tabs-mode-maybe-h ()
|
|
"Disable `centaur-tabs-mode' in current buffer."
|
|
(when (centaur-tabs-mode-on-p)
|
|
(centaur-tabs-local-mode)))))
|
|
|
|
|
|
;; TODO tab-bar-mode (emacs 27)
|
|
;; TODO tab-line-mode (emacs 27)
|