summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-02-26 11:31:50 -0600
committerCase Duckworth2021-02-26 11:31:50 -0600
commitd3b6cd94ecb29577a97e61a9bb31366979052e8f (patch)
tree6045fb292fa288875d0c0b5ad8761e894c2aa4e2
parentW h I t E s P a C e (diff)
downloademacs-d3b6cd94ecb29577a97e61a9bb31366979052e8f.tar.gz
emacs-d3b6cd94ecb29577a97e61a9bb31366979052e8f.zip
LINE ENDINGS
-rw-r--r--LICENSE28
-rw-r--r--early-init.el246
-rw-r--r--init.el102
3 files changed, 188 insertions, 188 deletions
diff --git a/LICENSE b/LICENSE index 767282c..de537e6 100644 --- a/LICENSE +++ b/LICENSE
@@ -1,14 +1,14 @@
1DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 1DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2 2
3Version 2, December 2004 3Version 2, December 2004
4 4
5Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> 5Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
6 6
7Everyone is permitted to copy and distribute verbatim or modified copies of 7Everyone is permitted to copy and distribute verbatim or modified copies of
8this license document, and changing it is allowed as long as the name is changed. 8this license document, and changing it is allowed as long as the name is changed.
9 9
10DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 10DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11 11
12TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
13 13
140. You just DO WHAT THE FUCK YOU WANT TO. 140. You just DO WHAT THE FUCK YOU WANT TO.
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
diff --git a/init.el b/init.el index a0e072f..7cf9f7a 100644 --- a/init.el +++ b/init.el
@@ -1,51 +1,51 @@
1;;; init.el -*- lexical-binding: t; coding: utf-8 -*- 1;;; init.el -*- lexical-binding: 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(setq-default load-prefer-newer t) 17(setq-default load-prefer-newer t)
18 18
19(message "%s..." "Loading init.el") 19(message "%s..." "Loading init.el")
20(let* (;; Speed up init 20(let* (;; Speed up init
21 (gc-cons-threshold most-positive-fixnum) 21 (gc-cons-threshold most-positive-fixnum)
22 ;; (gc-cons-percentage 0.6) 22 ;; (gc-cons-percentage 0.6)
23 (file-name-handler-alist nil) 23 (file-name-handler-alist nil)
24 ;; Config file names 24 ;; Config file names
25 (config (expand-file-name "config" 25 (config (expand-file-name "config"
26 user-emacs-directory)) 26 user-emacs-directory))
27 (config.el (concat config ".el")) 27 (config.el (concat config ".el"))
28 (config.org (concat config ".org")) 28 (config.org (concat config ".org"))
29 (straight-org-dir (locate-user-emacs-file "straight/build/org"))) 29 (straight-org-dir (locate-user-emacs-file "straight/build/org")))
30 ;; Okay, let's figure this out. 30 ;; Okay, let's figure this out.
31 ;; `and' evaluates each form, and returns nil on the first that 31 ;; `and' evaluates each form, and returns nil on the first that
32 ;; returns nil. `unless' only executes its body if the test 32 ;; returns nil. `unless' only executes its body if the test
33 ;; returns nil. So. 33 ;; returns nil. So.
34 ;; 1. Test if config.org is newer than config.el. If it is (t), we 34 ;; 1. Test if config.org is newer than config.el. If it is (t), we
35 ;; *want* to evaluate the body, so we need to negate that test. 35 ;; *want* to evaluate the body, so we need to negate that test.
36 ;; 2. Try to load the config. If it errors (nil), it'll bubble that 36 ;; 2. Try to load the config. If it errors (nil), it'll bubble that
37 ;; to the `and' and the body will be evaluated. 37 ;; to the `and' and the body will be evaluated.
38 (unless (and (not (file-newer-than-file-p config.org config.el)) 38 (unless (and (not (file-newer-than-file-p config.org config.el))
39 (load config :noerror)) 39 (load config :noerror))
40 ;; A plain require here just loads the older `org' 40 ;; A plain require here just loads the older `org'
41 ;; in Emacs' install dir. We need to add the newer 41 ;; in Emacs' install dir. We need to add the newer
42 ;; one to the `load-path', hopefully that's all. 42 ;; one to the `load-path', hopefully that's all.
43 (when (file-exists-p straight-org-dir) 43 (when (file-exists-p straight-org-dir)
44 (add-to-list 'load-path straight-org-dir)) 44 (add-to-list 'load-path straight-org-dir))
45 ;; Load config.org 45 ;; Load config.org
46 (message "%s..." "Loading config.org") 46 (message "%s..." "Loading config.org")
47 (require 'org) 47 (require 'org)
48 (org-babel-load-file config.org) 48 (org-babel-load-file config.org)
49 (message "%s... Done" "Loading config.org"))) 49 (message "%s... Done" "Loading config.org")))
50(message "%s... Done." "Loading init.el") 50(message "%s... Done." "Loading init.el")
51;;; init.el ends here 51;;; init.el ends here