diff --git a/ha-config.org b/ha-config.org index 920ad74..5ba4589 100644 --- a/ha-config.org +++ b/ha-config.org @@ -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 diff --git a/ha-theme.org b/ha-theme.org index 4e8e7d8..c6b15d1 100644 --- a/ha-theme.org +++ b/ha-theme.org @@ -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))))