about summary refs log tree commit diff stats
path: root/early-init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-02-26 11:31:50 -0600
committerCase Duckworth2021-02-26 11:31:50 -0600
commitd3b6cd94ecb29577a97e61a9bb31366979052e8f (patch)
tree6045fb292fa288875d0c0b5ad8761e894c2aa4e2 /early-init.el
parentW h I t E s P a C e (diff)
downloademacs-d3b6cd94ecb29577a97e61a9bb31366979052e8f.tar.gz
emacs-d3b6cd94ecb29577a97e61a9bb31366979052e8f.zip
LINE ENDINGS
Diffstat (limited to 'early-init.el')
-rw-r--r--early-init.el246
1 files changed, 123 insertions, 123 deletions
diff --git a/early-init.el b/early-init.el index 056670a..ef72beb 100644 --- a/early-init.el +++ b/early-init.el
@@ -1,123 +1,123 @@
1;;; early-init.el -*- no-byte-compile: t; coding: utf-8 -*- 1;;; early-init.el -*- no-byte-compile: t; coding: utf-8 -*-
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(message "%s..." "Loading early-init.el") 17(message "%s..." "Loading early-init.el")
18;; BOOTSTRAP PACKAGE MANAGEMENT 18;; BOOTSTRAP PACKAGE MANAGEMENT
19(let ((win-app-dir "~/Applications")) 19(let ((win-app-dir "~/Applications"))
20 (dolist (path (list 20 (dolist (path (list
21 ;; Windows 21 ;; Windows
22 (expand-file-name "exe" win-app-dir) 22 (expand-file-name "exe" win-app-dir)
23 (expand-file-name "exe/bin" win-app-dir) 23 (expand-file-name "exe/bin" win-app-dir)
24 (expand-file-name "Git/bin" win-app-dir) 24 (expand-file-name "Git/bin" win-app-dir)
25 (expand-file-name "Git/usr/bin" win-app-dir) 25 (expand-file-name "Git/usr/bin" win-app-dir)
26 (expand-file-name "Git/mingw64/bin" win-app-dir) 26 (expand-file-name "Git/mingw64/bin" win-app-dir)
27 (expand-file-name "Everything" win-app-dir) 27 (expand-file-name "Everything" win-app-dir)
28 (expand-file-name "Win-builds/bin" win-app-dir) 28 (expand-file-name "Win-builds/bin" win-app-dir)
29 (expand-file-name "Z/bin" win-app-dir) 29 (expand-file-name "Z/bin" win-app-dir)
30 ;; Linux 30 ;; Linux
31 (expand-file-name "bin" user-emacs-directory) 31 (expand-file-name "bin" user-emacs-directory)
32 (expand-file-name "~/bin") 32 (expand-file-name "~/bin")
33 (expand-file-name "~/.local/bin") 33 (expand-file-name "~/.local/bin")
34 (expand-file-name "~/Scripts") 34 (expand-file-name "~/Scripts")
35 )) 35 ))
36 (when (file-exists-p path) 36 (when (file-exists-p path)
37 (add-to-list 'exec-path path :append)))) 37 (add-to-list 'exec-path path :append))))
38 38
39;; Set $PATH 39;; Set $PATH
40(setenv "PATH" (mapconcat #'identity exec-path path-separator)) 40(setenv "PATH" (mapconcat #'identity exec-path path-separator))
41(setq package-enable-at-startup nil) 41(setq package-enable-at-startup nil)
42(defun acdw/bootstrap-straight () 42(defun acdw/bootstrap-straight ()
43 "Bootstrap straight.el." 43 "Bootstrap straight.el."
44 (defvar bootstrap-version) 44 (defvar bootstrap-version)
45 (let ((bootstrap-file 45 (let ((bootstrap-file
46 (expand-file-name 46 (expand-file-name
47 "straight/repos/straight.el/bootstrap.el" 47 "straight/repos/straight.el/bootstrap.el"
48 user-emacs-directory)) 48 user-emacs-directory))
49 (bootstrap-version 5)) 49 (bootstrap-version 5))
50 (unless (file-exists-p bootstrap-file) 50 (unless (file-exists-p bootstrap-file)
51 (with-current-buffer 51 (with-current-buffer
52 (url-retrieve-synchronously 52 (url-retrieve-synchronously
53 (concat 53 (concat
54 "https://raw.githubusercontent.com/" 54 "https://raw.githubusercontent.com/"
55 "raxod502/straight.el/develop/install.el") 55 "raxod502/straight.el/develop/install.el")
56 'silent 'inhibit-cookies) 56 'silent 'inhibit-cookies)
57 (goto-char (point-max)) 57 (goto-char (point-max))
58 (eval-print-last-sexp))) 58 (eval-print-last-sexp)))
59 (load bootstrap-file nil 'nomessage))) 59 (load bootstrap-file nil 'nomessage)))
60(when (executable-find "git") 60(when (executable-find "git")
61 (unless (ignore-errors (acdw/bootstrap-straight)) 61 (unless (ignore-errors (acdw/bootstrap-straight))
62 (let ((msg "Straight.el didn't bootstrap correctly. Cloning directly")) 62 (let ((msg "Straight.el didn't bootstrap correctly. Cloning directly"))
63 (message "%s..." msg) 63 (message "%s..." msg)
64 (call-process "git" nil 64 (call-process "git" nil
65 (get-buffer-create "*bootstrap-straight-messages*") nil 65 (get-buffer-create "*bootstrap-straight-messages*") nil
66 "clone" 66 "clone"
67 "https://github.com/raxod502/straight.el" 67 "https://github.com/raxod502/straight.el"
68 (expand-file-name "straight/repos/straight.el" 68 (expand-file-name "straight/repos/straight.el"
69 user-emacs-directory)) 69 user-emacs-directory))
70 (message "%s...Done." msg) 70 (message "%s...Done." msg)
71 (acdw/bootstrap-straight)))) 71 (acdw/bootstrap-straight))))
72;; SETUP FRAME 72;; SETUP FRAME
73(add-to-list 'default-frame-alist 73(add-to-list 'default-frame-alist
74 '(tool-bar-lines . 0)) 74 '(tool-bar-lines . 0))
75 75
76(tool-bar-mode -1) 76(tool-bar-mode -1)
77(add-to-list 'default-frame-alist 77(add-to-list 'default-frame-alist
78 '(menu-bar-lines . 0)) 78 '(menu-bar-lines . 0))
79 79
80(menu-bar-mode -1) 80(menu-bar-mode -1)
81(add-to-list 'default-frame-alist 81(add-to-list 'default-frame-alist
82 '(vertical-scroll-bars . nil) 82 '(vertical-scroll-bars . nil)
83 '(horizontal-scroll-bars . nil)) 83 '(horizontal-scroll-bars . nil))
84 84
85(scroll-bar-mode -1) 85(scroll-bar-mode -1)
86(horizontal-scroll-bar-mode -1) 86(horizontal-scroll-bar-mode -1)
87(setq-default frame-inhibit-implied-resize t 87(setq-default frame-inhibit-implied-resize t
88 frame-resize-pixelwise t) 88 frame-resize-pixelwise t)
89(setq-default indicate-empty-lines t) 89(setq-default indicate-empty-lines t)
90(setq-default indicate-buffer-boundaries 'right) 90(setq-default indicate-buffer-boundaries 'right)
91(setq-default visual-line-fringe-indicators '(left-curly-arrow nil)) 91(setq-default visual-line-fringe-indicators '(left-curly-arrow nil))
92(defun hook--setup-fringes-curly-arrows () 92(defun hook--setup-fringes-curly-arrows ()
93 "Set up curly-arrow fringes." 93 "Set up curly-arrow fringes."
94 (define-fringe-bitmap 'left-curly-arrow 94 (define-fringe-bitmap 'left-curly-arrow
95 [#b11000000 95 [#b11000000
96 #b01100000 96 #b01100000
97 #b00110000 97 #b00110000
98 #b00011000]) 98 #b00011000])
99 99
100 (define-fringe-bitmap 'right-curly-arrow 100 (define-fringe-bitmap 'right-curly-arrow
101 [#b00011000 101 [#b00011000
102 #b00110000 102 #b00110000
103 #b01100000 103 #b01100000
104 #b11000000])) 104 #b11000000]))
105 105
106(add-hook 'after-init-hook #'hook--setup-fringes-curly-arrows) 106(add-hook 'after-init-hook #'hook--setup-fringes-curly-arrows)
107(defun hook--setup-fringes-arrows () 107(defun hook--setup-fringes-arrows ()
108 "Setup arrow fringe bitmaps." 108 "Setup arrow fringe bitmaps."
109 (define-fringe-bitmap 'left-arrow 109 (define-fringe-bitmap 'left-arrow
110 [#b00000000 110 [#b00000000
111 #b01010100 111 #b01010100
112 #b01010100 112 #b01010100
113 #b00000000]) 113 #b00000000])
114 114
115 (define-fringe-bitmap 'right-arrow 115 (define-fringe-bitmap 'right-arrow
116 [#b00000000 116 [#b00000000
117 #b00101010 117 #b00101010
118 #b00101010 118 #b00101010
119 #b00000000])) 119 #b00000000]))
120 120
121(add-hook 'after-init-hook #'hook--setup-fringes-arrows) 121(add-hook 'after-init-hook #'hook--setup-fringes-arrows)
122(message "%s... Done." "Loading early-init.el") 122(message "%s... Done." "Loading early-init.el")
123;;; early-init.el ends here 123;;; early-init.el ends here