about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-05-21 10:58:30 -0500
committerCase Duckworth2021-05-21 11:01:27 -0500
commit19f38149de0622c26f2aee8455b15f8a6c7365c6 (patch)
treef740659501aafaa4218b76a2b4693b6bad4bb0ff
parentComment out `hook-defun' (diff)
downloademacs-19f38149de0622c26f2aee8455b15f8a6c7365c6.tar.gz
emacs-19f38149de0622c26f2aee8455b15f8a6c7365c6.zip
Change hook for `acdw/frame-setup'
I found out about `after-make-frame-functions', a special hook that I want to
use instead of `after-focus-change-function'.  I also don't need to remove it
in the function because the hook only fires once after each frame is made.
-rw-r--r--early-init.el46
1 files changed, 22 insertions, 24 deletions
diff --git a/early-init.el b/early-init.el index bb717d6..d3d9a29 100644 --- a/early-init.el +++ b/early-init.el
@@ -61,30 +61,6 @@
61 inhibit-x-resources t ; Don't load ~/.Xresources 61 inhibit-x-resources t ; Don't load ~/.Xresources
62 ) 62 )
63 63
64(add-function :after after-focus-change-function
65 (defun acdw/first-frame-setup ()
66 ;; fonts
67 (require 'acdw-fonts)
68 (setq acdw-fonts/monospace (acdw/system
69 (:home "DejaVu Sans Mono")
70 (:work "Consolas")
71 (:other "monospace"))
72 acdw-fonts/monospace-size 10
73 acdw-fonts/variable (acdw/system
74 (:home "DejaVu Sans")
75 (:work "Calibri")
76 (:other "sans-serif"))
77 acdw-fonts/variable-size 12)
78 (acdw-fonts/set)
79 (acdw-fonts/setup-emoji-fonts "Segoe UI Emoji"
80 "Noto Color Emoji"
81 "Apple Color Emoji"
82 "Symbola")
83 ;; fringes
84 (acdw/setup-fringes)
85 ;; only run this once
86 (remove-function after-focus-change-function
87 'acdw/first-frame-setup)))
88(add-hook 'after-init-hook 64(add-hook 'after-init-hook
89 (defun after-init@disable-ui-modes () 65 (defun after-init@disable-ui-modes ()
90 (dolist (mode ;; each mode is of the form (MODE . FRAME-ALIST-VAR) 66 (dolist (mode ;; each mode is of the form (MODE . FRAME-ALIST-VAR)
@@ -98,6 +74,28 @@
98 (= 0 setting)) 74 (= 0 setting))
99 (funcall (car mode) -1)))))) 75 (funcall (car mode) -1))))))
100 76
77(add-hook 'after-make-frame-functions
78 (defun acdw/frame-setup (&rest args)
79 (ignore args)
80 ;; fonts
81 (require 'acdw-fonts)
82 (setq acdw-fonts/monospace (acdw/system
83 (:home "DejaVu Sans Mono")
84 (:work "Consolas")
85 (:other "monospace"))
86 acdw-fonts/monospace-size 10
87 acdw-fonts/variable (acdw/system
88 (:home "DejaVu Sans")
89 (:work "Calibri")
90 (:other "sans-serif"))
91 acdw-fonts/variable-size 12)
92 (acdw-fonts/set)
93 (acdw-fonts/setup-emoji-fonts "Segoe UI Emoji"
94 "Noto Color Emoji"
95 "Apple Color Emoji"
96 "Symbola")
97 ;; fringes
98 (acdw/setup-fringes)))
101 99
102 100
103;;; Bootstrap package manager (`straight.el') 101;;; Bootstrap package manager (`straight.el')