Org Fonts

- Change variable pitch font from Cantarell to Ubuntu Nerd Font
- Use DT's org header level customization
- Enable auto revert for non file buffers
This commit is contained in:
Sravan Balaji
2022-07-01 09:53:52 -04:00
parent 7f0e5c606a
commit 2c81c199a4
3 changed files with 207 additions and 163 deletions

View File

@@ -327,9 +327,9 @@ They all accept either a font-spec, font string ("Input Mono-12"), or xlfd font
Set regular, variable pitch, and big fonts. Set regular, variable pitch, and big fonts.
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
(setq doom-font (font-spec :family "VictorMono Nerd Font Mono" :size 14) (setq doom-font (font-spec :family "VictorMono Nerd Font" :size 14)
doom-variable-pitch-font (font-spec :family "Cantarell" :size 14) doom-variable-pitch-font (font-spec :family "Ubuntu Nerd Font" :size 14)
doom-big-font (font-spec :family "sb/source-code-font" :size 24)) doom-big-font (font-spec :family "VictorMono Nerd Font" :size 24))
#+END_SRC #+END_SRC
Enable *bold* and /italic/ text. Enable *bold* and /italic/ text.
@@ -418,6 +418,29 @@ If you use =org= and don't want your org files in the default location below, ch
(setq org-hide-emphasis-markers t) (setq org-hide-emphasis-markers t)
#+END_SRC #+END_SRC
**** Fonts
#+BEGIN_SRC emacs-lisp :tangle config.el
(after! org-faces
(defun org-colors-dracula ()
"Enable Dracula colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#8be9fd" ultra-bold)
(org-level-2 1.6 "#bd93f9" extra-bold)
(org-level-3 1.5 "#50fa7b" bold)
(org-level-4 1.4 "#ff79c6" semi-bold)
(org-level-5 1.3 "#9aedfe" normal)
(org-level-6 1.2 "#caa9fa" normal)
(org-level-7 1.1 "#5af78e" normal)
(org-level-8 1.0 "#ff92d0" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
;; Load our desired org-colors-* theme on startup
(org-colors-dracula))
#+END_SRC
*** Projectile *** Projectile
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
@@ -451,6 +474,7 @@ Revert buffers when the underlying file has changed
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
(global-auto-revert-mode 1) (global-auto-revert-mode 1)
(setq global-auto-revert-non-file-buffers t)
#+END_SRC #+END_SRC
** packages.el ** packages.el

View File

@@ -2,9 +2,9 @@
(setq user-full-name "Sravan Balaji") (setq user-full-name "Sravan Balaji")
(setq doom-font (font-spec :family "VictorMono Nerd Font Mono" :size 14) (setq doom-font (font-spec :family "VictorMono Nerd Font" :size 14)
doom-variable-pitch-font (font-spec :family "Cantarell" :size 14) doom-variable-pitch-font (font-spec :family "Ubuntu Nerd Font" :size 14)
doom-big-font (font-spec :family "sb/source-code-font" :size 24)) doom-big-font (font-spec :family "VictorMono Nerd Font" :size 24))
(after! doom-themes (after! doom-themes
(setq doom-themes-enable-bold t (setq doom-themes-enable-bold t
@@ -40,6 +40,25 @@
(setq org-hide-emphasis-markers t) (setq org-hide-emphasis-markers t)
(after! org-faces
(defun org-colors-dracula ()
"Enable Dracula colors for Org headers."
(interactive)
(dolist
(face
'((org-level-1 1.7 "#8be9fd" ultra-bold)
(org-level-2 1.6 "#bd93f9" extra-bold)
(org-level-3 1.5 "#50fa7b" bold)
(org-level-4 1.4 "#ff79c6" semi-bold)
(org-level-5 1.3 "#9aedfe" normal)
(org-level-6 1.2 "#caa9fa" normal)
(org-level-7 1.1 "#5af78e" normal)
(org-level-8 1.0 "#ff92d0" normal)))
(set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face)))
(set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf"))
;; Load our desired org-colors-* theme on startup
(org-colors-dracula))
(setq projectile-project-search-path '("~/Projects/" "~/.config/")) (setq projectile-project-search-path '("~/Projects/" "~/.config/"))
(add-hook! 'web-mode-hook 'prettier-js-mode) (add-hook! 'web-mode-hook 'prettier-js-mode)
@@ -50,3 +69,4 @@
(add-to-list 'auto-mode-alist '("\\.m\\'" . octave-mode)) (add-to-list 'auto-mode-alist '("\\.m\\'" . octave-mode))
(global-auto-revert-mode 1) (global-auto-revert-mode 1)
(setq global-auto-revert-non-file-buffers t)