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