summaryrefslogtreecommitdiff
path: root/emacs/functions.el
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2024-07-27 10:37:21 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2024-07-27 10:37:21 +0100
commit373d9c521922fd2dabae5f2b0684f78c6321e36a (patch)
treecd24e229ebf1e0f0785cc61a273b870de8edc46f /emacs/functions.el
parent4bd01a5bae0cdec21cb4df4d5505de391a6ba869 (diff)
emacs: Use nice fonts
Diffstat (limited to 'emacs/functions.el')
-rw-r--r--emacs/functions.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/functions.el b/emacs/functions.el
index accb52b..9eb405b 100644
--- a/emacs/functions.el
+++ b/emacs/functions.el
@@ -43,6 +43,13 @@ enabled."
(enable-theme light-theme)
(disable-theme dark-theme)))))
+(defun my/set-frame-font ()
+ "Set font in the selected frame."
+ (let* ((pred (lambda (font) (x-family-fonts (plist-get font :family))))
+ (font (seq-find pred my/fonts)))
+ (when font
+ (apply #'set-face-attribute `(default nil ,@font)))))
+
;; “Window Management” Functions