Graphical tweaks to the tab-bar
Looks good on a big monitor.
This commit is contained in:
parent
a02093de9c
commit
d46e4b7ece
2 changed files with 7 additions and 24 deletions
|
|
@ -1022,9 +1022,8 @@ Couple notes:
|
|||
tab-bar-close-button-show nil ; hide tab close / X button
|
||||
tab-bar-new-tab-choice "*dashboard*" ; buffer to show in new tabs
|
||||
tab-bar-tab-hints t ; show tab numbers
|
||||
|
||||
tab-bar-separator " "
|
||||
tab-bar-button-relief 0
|
||||
tab-bar-button-margin '(40 . 1)
|
||||
|
||||
;; Jump to a tab by numbers (see the keybindings set later):
|
||||
tab-bar-select-tab-modifiers '(super control))
|
||||
|
|
@ -1224,24 +1223,6 @@ First, create a variable that contains the Unicode values for the numbers. I am
|
|||
And then use this function to replace the standard =tab-bar-tab-name-format-function=:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun ha/tab-bar-tab-name-format-default (tab i)
|
||||
"Replacement for `tab-bar-tab-name-format-function'.
|
||||
Places a special symbol for the initial digit."
|
||||
(let ((current-p (eq (car tab) 'current-tab))
|
||||
(tab-num (if (and tab-bar-tab-hints (< i 10))
|
||||
(alist-get i ha/circle-numbers-alist) "")))
|
||||
(propertize
|
||||
(concat tab-num
|
||||
" "
|
||||
(alist-get 'name tab)
|
||||
(or (and tab-bar-close-button-show
|
||||
(not (eq tab-bar-close-button-show
|
||||
(if current-p 'non-selected 'selected)))
|
||||
tab-bar-close-button)
|
||||
"")
|
||||
" ")
|
||||
'face (funcall tab-bar-tab-face-function tab))))
|
||||
|
||||
(defun ha/tab-bar-tab-name-format-default (tab i)
|
||||
"Replacement for `tab-bar-tab-name-format-function'.
|
||||
Places a special symbol for the initial digit."
|
||||
|
|
@ -1251,10 +1232,12 @@ And then use this function to replace the standard =tab-bar-tab-name-format-fun
|
|||
(propertize
|
||||
(if (and tab-bar-tab-hints (< i 10)) (alist-get i ha/circle-numbers-alist) "")
|
||||
'face 'ha/tab-bar-numbers)
|
||||
;; Fixed-width gap so active (variable-pitch) and inactive tabs match
|
||||
(propertize " " 'face 'tab-bar)
|
||||
;; Add tab name with the face returned by tab-bar-tab-face-function
|
||||
(propertize
|
||||
(concat
|
||||
" " ; Add initial space
|
||||
" "
|
||||
(alist-get 'name tab)
|
||||
(or (and tab-bar-close-button-show
|
||||
(not (eq tab-bar-close-button-show
|
||||
|
|
|
|||
|
|
@ -330,10 +330,10 @@ Let’s make a /theme/:
|
|||
`(mode-line-active ((t (:background ,active))))
|
||||
`(mode-line-inactive ((t (:background ,inactive))))
|
||||
|
||||
`(tab-bar ((t :foreground ,default-fg :background ,inactive)))
|
||||
`(tab-bar ((t :foreground ,default-fg :background ,inactive :inherit variable-pitch)))
|
||||
`(tab-line ((t :foreground ,default-fg :background ,inactive)))
|
||||
`(tab-bar-tab ((t (:inherit variable-pitch :background ,active))))
|
||||
`(tab-bar-tab-inactive ((t (:inherit variable-pitch :background ,inactive))))
|
||||
`(tab-bar-tab ((t (:inherit variable-pitch :background ,active :weight bold))))
|
||||
`(tab-bar-tab-inactive ((t (:inherit variable-pitch :background ,inactive :weight normal))))
|
||||
|
||||
`(doom-modeline-buffer-path ((t (:foreground ,almond))))
|
||||
`(doom-modeline-buffer-file ((t (:foreground "white" :weight bold))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue