diff options
Diffstat (limited to 'early-init.el')
-rw-r--r-- | early-init.el | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/early-init.el b/early-init.el index 622d220..d3d9a29 100644 --- a/early-init.el +++ b/early-init.el | |||
@@ -34,11 +34,12 @@ | |||
34 | inhibit-x-resources t) | 34 | inhibit-x-resources t) |
35 | (acdw/gc-disable) | 35 | (acdw/gc-disable) |
36 | 36 | ||
37 | (hook-defun post-init-reset after-init-hook | 37 | (add-hook 'after-init-hook |
38 | (acdw/gc-enable) | 38 | (defun after-init@reset () |
39 | (dolist (handler file-name-handler-alist) | 39 | (acdw/gc-enable) |
40 | (add-to-list 'orig-file-name-handler-alist handler)) | 40 | (dolist (handler file-name-handler-alist) |
41 | (setq file-name-handler-alist orig-file-name-handler-alist)) | 41 | (add-to-list 'orig-file-name-handler-alist handler)) |
42 | (setq file-name-handler-alist orig-file-name-handler-alist))) | ||
42 | 43 | ||
43 | ;;; Frame settings | 44 | ;;; Frame settings |
44 | (setq default-frame-alist ; Remove most UI | 45 | (setq default-frame-alist ; Remove most UI |
@@ -60,42 +61,41 @@ | |||
60 | inhibit-x-resources t ; Don't load ~/.Xresources | 61 | inhibit-x-resources t ; Don't load ~/.Xresources |
61 | ) | 62 | ) |
62 | 63 | ||
63 | (hook-defun disable-ui-modes after-init-hook | 64 | (add-hook 'after-init-hook |
64 | (dolist (mode ;; each mode is of the form (MODE . FRAME-ALIST-VAR) | 65 | (defun after-init@disable-ui-modes () |
65 | '((tool-bar-mode . tool-bar-lines) | 66 | (dolist (mode ;; each mode is of the form (MODE . FRAME-ALIST-VAR) |
66 | (menu-bar-mode . menu-bar-lines) | 67 | '((tool-bar-mode . tool-bar-lines) |
67 | (scroll-bar-mode . vertical-scroll-bars) | 68 | (menu-bar-mode . menu-bar-lines) |
68 | (horizontal-scroll-bar-mode . horizontal-scroll-bars) | 69 | (scroll-bar-mode . vertical-scroll-bars) |
69 | )) | 70 | (horizontal-scroll-bar-mode . horizontal-scroll-bars) |
70 | (let ((setting (alist-get (cdr mode) default-frame-alist))) | 71 | )) |
71 | (when (or (not setting) | 72 | (let ((setting (alist-get (cdr mode) default-frame-alist))) |
72 | (= 0 setting)) | 73 | (when (or (not setting) |
73 | (funcall (car mode) -1))))) | 74 | (= 0 setting)) |
74 | 75 | (funcall (car mode) -1)))))) | |
75 | (add-function :after after-focus-change-function | 76 | |
76 | (defun acdw/first-frame-setup () | 77 | (add-hook 'after-make-frame-functions |
77 | ;; fonts | 78 | (defun acdw/frame-setup (&rest args) |
78 | (require 'acdw-fonts) | 79 | (ignore args) |
79 | (setq acdw-fonts/monospace (acdw/system | 80 | ;; fonts |
80 | (:home "DejaVu Sans Mono") | 81 | (require 'acdw-fonts) |
81 | (:work "Consolas") | 82 | (setq acdw-fonts/monospace (acdw/system |
82 | (:other "monospace")) | 83 | (:home "DejaVu Sans Mono") |
83 | acdw-fonts/monospace-size 10 | 84 | (:work "Consolas") |
84 | acdw-fonts/variable (acdw/system | 85 | (:other "monospace")) |
85 | (:home "DejaVu Sans") | 86 | acdw-fonts/monospace-size 10 |
86 | (:work "Calibri") | 87 | acdw-fonts/variable (acdw/system |
87 | (:other "sans-serif")) | 88 | (:home "DejaVu Sans") |
88 | acdw-fonts/variable-size 12) | 89 | (:work "Calibri") |
89 | (acdw-fonts/set) | 90 | (:other "sans-serif")) |
90 | (acdw-fonts/setup-emoji-fonts "Segoe UI Emoji" | 91 | acdw-fonts/variable-size 12) |
91 | "Noto Color Emoji" | 92 | (acdw-fonts/set) |
92 | "Apple Color Emoji" | 93 | (acdw-fonts/setup-emoji-fonts "Segoe UI Emoji" |
93 | "Symbola") | 94 | "Noto Color Emoji" |
94 | ;; fringes | 95 | "Apple Color Emoji" |
95 | (acdw/setup-fringes) | 96 | "Symbola") |
96 | ;; only run this once | 97 | ;; fringes |
97 | (remove-function after-focus-change-function | 98 | (acdw/setup-fringes))) |
98 | 'acdw/first-frame-setup))) | ||
99 | 99 | ||
100 | 100 | ||
101 | ;;; Bootstrap package manager (`straight.el') | 101 | ;;; Bootstrap package manager (`straight.el') |