doomemacs/modules/ui/tabs/config.el

34 lines
1.1 KiB
EmacsLisp
Raw Normal View History

;;; ui/tabs/config.el -*- lexical-binding: t; -*-
;;
;;; Packages
(use-package! centaur-tabs
:defer t
: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 ""
centaur-tabs-icon-type 'nerd-icons
2020-05-03 14:55:36 -04:00
;; 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)
(if (daemonp)
(add-hook 'server-after-make-frame-hook #'centaur-tabs-mode)
(add-hook 'doom-first-file-hook #'centaur-tabs-mode))
: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)