summary refs log tree commit diff stats
path: root/early-init.el
diff options
context:
space:
mode:
Diffstat (limited to 'early-init.el')
-rw-r--r--early-init.el36
1 files changed, 19 insertions, 17 deletions
diff --git a/early-init.el b/early-init.el index 622d220..bb717d6 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,18 +61,6 @@
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 (dolist (mode ;; each mode is of the form (MODE . FRAME-ALIST-VAR)
65 '((tool-bar-mode . tool-bar-lines)
66 (menu-bar-mode . menu-bar-lines)
67 (scroll-bar-mode . vertical-scroll-bars)
68 (horizontal-scroll-bar-mode . horizontal-scroll-bars)
69 ))
70 (let ((setting (alist-get (cdr mode) default-frame-alist)))
71 (when (or (not setting)
72 (= 0 setting))
73 (funcall (car mode) -1)))))
74
75(add-function :after after-focus-change-function 64(add-function :after after-focus-change-function
76 (defun acdw/first-frame-setup () 65 (defun acdw/first-frame-setup ()
77 ;; fonts 66 ;; fonts
@@ -96,6 +85,19 @@
96 ;; only run this once 85 ;; only run this once
97 (remove-function after-focus-change-function 86 (remove-function after-focus-change-function
98 'acdw/first-frame-setup))) 87 'acdw/first-frame-setup)))
88(add-hook 'after-init-hook
89 (defun after-init@disable-ui-modes ()
90 (dolist (mode ;; each mode is of the form (MODE . FRAME-ALIST-VAR)
91 '((tool-bar-mode . tool-bar-lines)
92 (menu-bar-mode . menu-bar-lines)
93 (scroll-bar-mode . vertical-scroll-bars)
94 (horizontal-scroll-bar-mode . horizontal-scroll-bars)
95 ))
96 (let ((setting (alist-get (cdr mode) default-frame-alist)))
97 (when (or (not setting)
98 (= 0 setting))
99 (funcall (car mode) -1))))))
100
99 101
100 102
101;;; Bootstrap package manager (`straight.el') 103;;; Bootstrap package manager (`straight.el')