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.el79
1 files changed, 48 insertions, 31 deletions
diff --git a/early-init.el b/early-init.el index 103e0b4..5ebc544 100644 --- a/early-init.el +++ b/early-init.el
@@ -1,53 +1,70 @@
1;; early-init.el -*- no-byte-compile: t; -*- 1;; early-init.el -*- no-byte-compile: t; -*-
2;; This file is automatically tangled from config.org. 2;; This file is automatically tangled from config.org.
3;; Hand edits will be overwritten! 3;; Hand edits will be overwritten!
4;; BOOTSTRAP PACKAGE MANAGEMENT
5(let ((win-app-dir "~/Applications"))
6 (dolist (path (list
7 ;; Windows
8 (expand-file-name "Git/bin" win-app-dir)
9 (expand-file-name "Git/usr/bin" win-app-dir)
10 (expand-file-name "Git/mingw64/bin" win-app-dir)
11 ;; Linux
12 (expand-file-name "bin"
13 user-emacs-directory)
14 (expand-file-name "~/bin")
15 (expand-file-name "~/.local/bin")
16 (expand-file-name "~/Scripts")
17 ))
18 (when (file-exists-p path)
19 (add-to-list 'exec-path path :append))))
4 20
21;; Set $PATH
22(setenv "PATH" (mapconcat #'identity exec-path path-separator))
5(setq package-enable-at-startup nil) 23(setq package-enable-at-startup nil)
6(defun acdw/bootstrap-straight () 24(defun acdw/bootstrap-straight ()
7 "Bootstrap straight.el." 25 "Bootstrap straight.el."
8 (defvar bootstrap-version) 26 (defvar bootstrap-version)
9 (let ((bootstrap-file 27 (let ((bootstrap-file
10 (expand-file-name 28 (expand-file-name
11 "straight/repos/straight.el/bootstrap.el" 29 "straight/repos/straight.el/bootstrap.el"
12 user-emacs-directory)) 30 user-emacs-directory))
13 (bootstrap-version 5)) 31 (bootstrap-version 5))
14 (unless (file-exists-p bootstrap-file) 32 (unless (file-exists-p bootstrap-file)
15 (with-current-buffer 33 (with-current-buffer
16 (url-retrieve-synchronously 34 (url-retrieve-synchronously
17 (concat 35 (concat
18 "https://raw.githubusercontent.com/" 36 "https://raw.githubusercontent.com/"
19 "raxod502/straight.el/develop/install.el") 37 "raxod502/straight.el/develop/install.el")
20 'silent 'inhibit-cookies) 38 'silent 'inhibit-cookies)
21 (goto-char (point-max)) 39 (goto-char (point-max))
22 (eval-print-last-sexp))) 40 (eval-print-last-sexp)))
23 (load bootstrap-file nil 'nomessage))) 41 (load bootstrap-file nil 'nomessage)))
24(unless (ignore-errors (acdw/bootstrap-straight)) 42(when (executable-find "git")
25 (let ((msg "Straight.el didn't bootstrap correctly. Cloning directly")) 43 (unless (ignore-errors (acdw/bootstrap-straight))
26 (message "%s..." msg) 44 (let ((msg "Straight.el didn't bootstrap correctly. Cloning directly"))
27 (call-process "git" nil 45 (message "%s..." msg)
28 (get-buffer-create "*bootstrap-straight-messages*") nil 46 (call-process "git" nil
29 "clone" 47 (get-buffer-create "*bootstrap-straight-messages*") nil
30 "https://github.com/raxod502/straight.el" 48 "clone"
31 (expand-file-name "straight/repos/straight.el" 49 "https://github.com/raxod502/straight.el"
32 user-emacs-directory)) 50 (expand-file-name "straight/repos/straight.el"
33 (message "%s...Done." msg) 51 user-emacs-directory))
34 (acdw/bootstrap-straight))) 52 (message "%s...Done." msg)
35 53 (acdw/bootstrap-straight))))
36(setq-default frame-inhibit-implied-resize t) 54;; SETUP FRAME
37
38(setq-default frame-resize-pixelwise t)
39
40(add-to-list 'default-frame-alist 55(add-to-list 'default-frame-alist
41 '(tool-bar-lines . 0)) 56 '(tool-bar-lines . 0))
42 57
43(tool-bar-mode -1) 58(tool-bar-mode -1)
44(add-to-list 'default-frame-alist 59(add-to-list 'default-frame-alist
45 '(menu-bar-lines . 0)) 60 '(menu-bar-lines . 0))
46 61
47(menu-bar-mode -1) 62(menu-bar-mode -1)
48(add-to-list 'default-frame-alist 63(add-to-list 'default-frame-alist
49 '(vertical-scroll-bars . nil) 64 '(vertical-scroll-bars . nil)
50 '(horizontal-scroll-bars . nil)) 65 '(horizontal-scroll-bars . nil))
51 66
52(scroll-bar-mode -1) 67(scroll-bar-mode -1)
53(horizontal-scroll-bar-mode -1) 68(horizontal-scroll-bar-mode -1)
69(setq-default frame-inhibit-implied-resize t
70 frame-resize-pixelwise t)