Skip to content

Instantly share code, notes, and snippets.

@egstatsml
Created June 18, 2025 06:53
Show Gist options
  • Save egstatsml/280c68218b8106d58b60a63e2fbae760 to your computer and use it in GitHub Desktop.
Save egstatsml/280c68218b8106d58b60a63e2fbae760 to your computer and use it in GitHub Desktop.
;; add a bunch of items to a list
;; think I got this from doom
(defun ethan/append-to-list (list-var elements)
"Append ELEMENTS to the end of LIST-VAR.
The return value is the new value of LIST-VAR."
(unless (consp elements)
(error "ELEMENTS must be a list"))
(let ((list (symbol-value list-var)))
(if list
(setcdr (last list) elements)
(set list-var elements)))
(symbol-value list-var))
(use-package mixed-pitch
:ensure t
:hook((LaTeX-mode . mixed-pitch-mode)
(org-mode . mixed-pitch-mode))
:config
(ethan/append-to-list 'mixed-pitch-fixed-pitch-faces
'(solaire-line-number-face
org-date
org-footnote
org-special-keyword
org-property-value
org-ref-cite-face
org-tag
org-todo-keyword-todo
org-todo-keyword-habt
org-todo-keyword-done
org-todo-keyword-wait
org-todo-keyword-kill
org-todo-keyword-outd
org-todo
org-done
org-modern-priority
org-modern-tag
org-modern-done
org-modern-date-active
org-modern-date-inactive
org-modern-time-active
org-modern-time-inactive
org-drawer
font-lock-comment-face
)))
(use-package fontaine
:ensure t
:config
;; The concise one which relies on "implicit fallback values"
(setq fontaine-presets
'((regular
:default-height 100)
;; settinging some font for a smaller screen
(small-screen
:default-weight semilight
:default-height 140)
;; settinging some font for a larger screen
(larger-screen
:default-weight semilight
:default-height 155)
(large
:default-weight semilight
:default-height 180
:bold-weight extrabold)
(t ; our shared fallback properties
:default-family "Iosevka Comfy Wide"
:default-weight medium
;; I just really like computer modern font
:variable-pitch-family "CMU Serif"
:variable-pitch-height 1.5)))
;; now set the preset
;; if is my laptop or lab machine, the screens are a bit smaller and I am sitting
;; a bit closer so will make the font a tad larger
;; you can simplify this on your end if you want, just need to call
;; `(fontaine-set-preset 'VALUE)
;; with whatever you called your display setting
(if (or (equal (system-name) "lab") (equal (system-name) "mover"))
(fontaine-set-preset 'small-screen)
;; otherwise at home with a screen that is a touch bigger
;; and am sitting a bit further away so make font bigger
(fontaine-set-preset 'larger-screen)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment