From 4a35a29609846d2dfed984c0d849f2518abb8d4b Mon Sep 17 00:00:00 2001 From: Tobias Ostner Date: Sat, 22 Nov 2025 14:58:24 +0100 Subject: [PATCH] Fontaine and tab bar amendmends --- flakes/emacs/config/init.el | 60 ++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/flakes/emacs/config/init.el b/flakes/emacs/config/init.el index c333c05..9a6ae0d 100644 --- a/flakes/emacs/config/init.el +++ b/flakes/emacs/config/init.el @@ -251,15 +251,7 @@ (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) (add-hook 'package-menu-mode-hook #'hl-line-mode) - (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) - ;; TODO: symbols function definition is void - ;; (add-hook 'enable-theme-functions - ;; (lambda (&rest _args) - ;; (set-face-attribute - ;; 'tab-bar nil - ;; :box `(:line-width 4 :color ,(modus-themes-get-color-value 'bg-main)) - ;; :background (modus-themes-get-color-value 'bg-main)))) - ) + (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)) (use-package envrc :config @@ -285,8 +277,7 @@ (keymap-global-unset "C-z" nil)) (use-package fontaine - :config - (setq-default text-scale-remap-header-line t) + :init (setq fontaine-presets '((regular) (presentation @@ -303,15 +294,17 @@ :bold-weight bold :italic-slant italic :line-spacing 0.2))) + :config + (setq-default text-scale-remap-header-line t) + (fontaine-set-preset (or (fontaine-restore-latest-preset) 'regular)) (add-hook 'kill-emacs-hook #'fontaine-store-latest-preset) - (dolist (hook '(modus-themes-after-load-theme-hook ef-themes-post-load-hook)) - (add-hook hook #'fontaine-apply-current-preset)) (dolist (hook '(text-mode-hook help-mode-hook)) - (add-hook hook (lambda () - (unless (or (derived-mode-p 'mhtml-mode 'nxml-mode 'yaml-mode) - (member (buffer-name) '("*Colors*" "*Faces*" "*Quick Help*"))) - (variable-pitch-mode))))) - (fontaine-set-preset (or (fontaine-restore-latest-preset) 'regular))) + (add-hook + hook + (lambda () + (unless (or (derived-mode-p 'mhtml-mode 'nxml-mode 'yaml-mode) + (member (buffer-name) '("*Colors*" "*Faces*" "*Quick Help*"))) + (variable-pitch-mode)))))) (use-package gptel :bind ("C-c RET" . gptel-send) @@ -410,11 +403,36 @@ (use-package modus-themes :config + (defun to/modus-themes-custom-faces (&rest _) + (setq x-underline-at-descent-line t) + (let ((bg-main (modus-themes-get-color-value 'bg-main)) + (bg-mode-line-active (modus-themes-get-color-value 'bg-mode-line-active)) + (bg-mode-line-inactive (modus-themes-get-color-value 'bg-mode-line-inactive)) + (border-mode-line-active (modus-themes-get-color-value 'border-mode-line-active)) + (border-mode-line-inactive (modus-themes-get-color-value 'border-mode-line-inactive))) + + (set-face-attribute + 'tab-bar nil + :box (list :line-width 4 :color bg-main) + :background bg-main) + + (set-face-attribute + 'mode-line nil + :underline border-mode-line-active + :overline border-mode-line-active + :box (list :line-width 4 :color bg-mode-line-active)) + + (set-face-attribute + 'mode-line-inactive nil + :underline border-mode-line-inactive + :overline border-mode-line-inactive + :box (list :line-width 4 :color bg-mode-line-inactive)))) + (setq modus-themes-org-blocks 'tinted-background modus-themes-bold-constructs t modus-themes-italic-constructs t modus-themes-completions '((t . (extrabold))) - modus-themes-to-toggle '(modus-operandi modus-vivendi) + modus-themes-to-toggle '(modus-operandi-tinted modus-vivendi-tinted) modus-themes-mixed-fonts t modus-themes-variable-pitch-ui nil modus-themes-headings @@ -425,7 +443,9 @@ modus-themes-common-palette-overrides '((fringe unspecified) (border-mode-line-active unspecified) (border-mode-line-inactive unspecified))) - (load-theme 'modus-vivendi-tinted t)) + + (add-hook 'modus-themes-after-load-theme-hook #'to/modus-themes-custom-faces) + (modus-themes-load-theme 'modus-vivendi-tinted)) (use-package minions :config