Make org-mode tables more legible with catppuccin-theme

Add hook to reload catppuccin after server makes frame to fix some
font issues
This commit is contained in:
Evie Litherland-Smith 2024-04-18 17:09:27 +01:00
parent 726079bffd
commit 7974430966

10
init.el
View file

@ -448,6 +448,8 @@ Try `magit-clone-default-directory' if available, fall back to
(use-package catppuccin-theme (use-package catppuccin-theme
:demand :demand
:hook
(server-after-make-frame . catppuccin-reload)
:custom :custom
(catppuccin-flavour 'mocha) (catppuccin-flavour 'mocha)
(catppuccin-italic-blockquotes t) (catppuccin-italic-blockquotes t)
@ -660,8 +662,12 @@ Try `magit-clone-default-directory' if available, fall back to
(lua . t) (lua . t)
(python . t))) (python . t)))
:config :config
;; Ensure tables and src blocks use fixed-pitch font (require 'catppuccin-theme)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch) ;; Ensure tables and src blocks use fixed-pitch font. Also increase
;; table foreground contrast to be more legible
(set-face-attribute 'org-table nil
:foreground (catppuccin-get-color 'overlay2)
:inherit 'fixed-pitch)
(set-face-attribute 'org-block nil :inherit 'fixed-pitch) (set-face-attribute 'org-block nil :inherit 'fixed-pitch)
;; Let quote and verse blocks use variable-pitch font, if configured ;; Let quote and verse blocks use variable-pitch font, if configured
(set-face-attribute 'org-quote nil :inherit 'variable-pitch) (set-face-attribute 'org-quote nil :inherit 'variable-pitch)