make centaur tabs global, setup misc, dired and help groupings
This commit is contained in:
parent
52de1bdd65
commit
281ea9b221
19
code/init.el
19
code/init.el
|
@ -76,7 +76,7 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; additional packages
|
||||
(add-to-list 'package-selected-packages
|
||||
'(centaur-tabs json-mode python-mode powershell rust-mode origami go-mode yaml-mode lua-mode)
|
||||
'(json-mode python-mode powershell rust-mode origami go-mode yaml-mode lua-mode)
|
||||
)
|
||||
(when (not kmn/is-dayjob)
|
||||
(add-to-list 'package-selected-packages
|
||||
|
@ -96,23 +96,6 @@
|
|||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; tab line via centaur tabs
|
||||
(require 'centaur-tabs)
|
||||
(setq centaur-tabs-set-bar 'under)
|
||||
(setq centaur-tabs-set-close-button nil)
|
||||
(setq centaur-tabs-set-modified-marker t)
|
||||
(setq centaur-tabs-set-icons t)
|
||||
(setq centaur-tabs-plain-icons t)
|
||||
(setq centaur-tabs-cycle-scope 'tabs)
|
||||
(setq centaur-tabs-show-new-tab-button nil)
|
||||
(add-hook 'dired-mode-hook 'centaur-tabs-local-mode)
|
||||
(add-hook 'org-agenda-mode 'centaur-tabs-local-mode)
|
||||
(global-set-key (kbd "C-c t i") 'centaur-tabs-backward)
|
||||
(global-set-key (kbd "C-c t <left>") 'centaur-tabs-backward)
|
||||
(global-set-key (kbd "C-c t e") 'centaur-tabs-forward)
|
||||
(global-set-key (kbd "C-c t <right>") 'centaur-tabs-forward)
|
||||
(global-set-key (kbd "C-c t y") 'centaur-tabs-local-mode)
|
||||
(global-set-key (kbd "C-c t <down>") 'centaur-tabs-local-mode)
|
||||
(global-set-key (kbd "C-c t <up>") 'centaur-tabs-local-mode)
|
||||
(centaur-tabs-mode t)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ; this goes in chemacs2 init -- DO NOT UNCOMMENT
|
||||
(package-initialize) ; this goes in chemacs2 init -- DO NOT UNCOMMENT
|
||||
(add-to-list 'package-selected-packages
|
||||
'(scratch persistent-scratch persp-mode rainbow-mode rainbow-delimiters markdown-mode focus zoom popwin dired-single diredfl doominhibitinhibit-modeline helpful helm helm-org dired-rainbow dired-rainbow-listing dired-single dash s origami modus-themes use-package)
|
||||
'(centaur-tabs scratch persistent-scratch persp-mode rainbow-mode rainbow-delimiters markdown-mode focus zoom popwin dired-single diredfl doominhibitinhibit-modeline helpful helm helm-org dired-rainbow dired-rainbow-listing dired-single dash s origami modus-themes use-package)
|
||||
)
|
||||
(when (not kmn/is-dayjob)
|
||||
(add-to-list 'package-selected-packages
|
||||
|
@ -494,6 +494,52 @@
|
|||
;(tab-bar-mode t)
|
||||
;(burly-tabs-mode 1)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; tab line via centaur tabs
|
||||
(require 'centaur-tabs)
|
||||
(setq centaur-tabs-set-bar 'under)
|
||||
(setq centaur-tabs-set-close-button nil)
|
||||
(setq centaur-tabs-set-modified-marker t)
|
||||
(setq centaur-tabs-set-icons t)
|
||||
(setq centaur-tabs-plain-icons t)
|
||||
(setq centaur-tabs-cycle-scope 'tabs)
|
||||
(setq centaur-tabs-show-new-tab-button nil)
|
||||
(add-hook 'dired-mode-hook 'centaur-tabs-local-mode)
|
||||
(add-hook 'org-agenda-mode 'centaur-tabs-local-mode)
|
||||
(global-set-key (kbd "C-c t i") 'centaur-tabs-backward)
|
||||
(global-set-key (kbd "C-c t <left>") 'centaur-tabs-backward)
|
||||
(global-set-key (kbd "C-c t e") 'centaur-tabs-forward)
|
||||
(global-set-key (kbd "C-c t <right>") 'centaur-tabs-forward)
|
||||
(global-set-key (kbd "C-c t y") 'centaur-tabs-local-mode)
|
||||
(global-set-key (kbd "C-c t <down>") 'centaur-tabs-local-mode)
|
||||
(global-set-key (kbd "C-c t <up>") 'centaur-tabs-local-mode)
|
||||
|
||||
(defun centaur-tabs-buffer-groups ()
|
||||
"`centaur-tabs-buffer-groups' control buffers' group rules.
|
||||
|
||||
Group centaur-tabs with mode if buffer is derived from `eshell-mode' `emacs-lisp-mode' `dired-mode' `org-mode' `magit-mode'.
|
||||
All buffer name start with * will group to \"Emacs\".
|
||||
Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||
(list
|
||||
(cond
|
||||
((string-equal "*" (substring (buffer-name) 0 1))
|
||||
(memq major-mode '(magit-process-mode
|
||||
magit-status-mode
|
||||
magit-diff-mode
|
||||
magit-log-mode
|
||||
magit-file-mode
|
||||
magit-blob-mode
|
||||
magit-blame-mode
|
||||
))
|
||||
"Misc")
|
||||
((derived-mode-p 'dired-mode)
|
||||
"Dired")
|
||||
((memq major-mode '(helpful-mode
|
||||
help-mode))
|
||||
"Help")
|
||||
(t
|
||||
(centaur-tabs-get-group-name (current-buffer))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; persp-mode
|
||||
(setq persp-auto-resume-time -1.0)
|
||||
|
|
Reference in a new issue