diff options
author | Case Duckworth | 2020-09-02 22:30:52 -0500 |
---|---|---|
committer | Case Duckworth | 2020-09-02 22:30:52 -0500 |
commit | 701fe0a21b92f693fed5420a8277c20e67948689 (patch) | |
tree | 635bafbafbd460a98b498936c9d409afdc05ebf7 | |
parent | Change theming and modeline (diff) | |
download | emacs-701fe0a21b92f693fed5420a8277c20e67948689.tar.gz emacs-701fe0a21b92f693fed5420a8277c20e67948689.zip |
Add early-init and change to straight
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | early-init.el | 55 | ||||
-rw-r--r-- | init.el | 144 |
3 files changed, 107 insertions, 93 deletions
diff --git a/.gitignore b/.gitignore index 0279948..a2ba0f5 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -1,3 +1,4 @@ | |||
1 | * | 1 | * |
2 | !early-init.el | ||
2 | !init.el | 3 | !init.el |
3 | !.gitignore \ No newline at end of file | 4 | !.gitignore \ No newline at end of file |
diff --git a/early-init.el b/early-init.el new file mode 100644 index 0000000..17d0579 --- /dev/null +++ b/early-init.el | |||
@@ -0,0 +1,55 @@ | |||
1 | ;;; early-init.el ~ acdw | ||
2 | |||
3 | ;;; gui | ||
4 | (push '(tool-bar-lines . 0) default-frame-alist) | ||
5 | (push '(menu-bar-lines . 0) default-frame-alist) | ||
6 | |||
7 | (unless (display-graphic-p) | ||
8 | (tool-bar-mode -1) | ||
9 | (menu-bar-mode -1)) | ||
10 | (scroll-bar-mode -1) | ||
11 | (fringe-mode '(7 . 1)) | ||
12 | |||
13 | (setq inhibit-startup-buffer-menu t) | ||
14 | (setq inhibit-startup-screen t) | ||
15 | (setq inhibit-startup-echo-area-message "acdw") | ||
16 | (setq initial-buffer-choice t) | ||
17 | (setq initial-scratch-message nil) | ||
18 | |||
19 | ;;; straight.el ~ github.com/raxod502/straight.el | ||
20 | |||
21 | ;; use use-package | ||
22 | (setq straight-use-package-by-default t) | ||
23 | |||
24 | ;; boostrap straight.el | ||
25 | (defvar bootstrap-version) | ||
26 | (let ((bootstrap-file | ||
27 | (expand-file-name "straight/repos/straight.el/bootstrap.el" | ||
28 | user-emacs-directory)) | ||
29 | (bootstrap-version 5)) | ||
30 | (unless (file-exists-p bootstrap-file) | ||
31 | (with-current-buffer | ||
32 | (url-retrieve-synchronously | ||
33 | "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" | ||
34 | 'silent 'inhibit-cookies) | ||
35 | (goto-char (point-max)) | ||
36 | (eval-print-last-sexp))) | ||
37 | (load bootstrap-file nil 'nomessage)) | ||
38 | |||
39 | ;; install use-package with straight | ||
40 | (straight-use-package 'use-package) | ||
41 | |||
42 | ;;; other init stuff | ||
43 | |||
44 | (setq gc-cons-threshold (* 256 1024 1024)) | ||
45 | (defvar file-name-handler-alist-old file-name-handler-alist) | ||
46 | (setq file-name-handler-alist nil) | ||
47 | (setq message-log-max 16384) | ||
48 | (setq byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local)) | ||
49 | |||
50 | ;; post-init | ||
51 | (add-hook 'after-init-hook | ||
52 | (lambda () | ||
53 | (setq file-name-handler-alist file-name-handler-alist-old) | ||
54 | (setq gc-cons-threshold (* 32 1024 1024))) | ||
55 | t) | ||
diff --git a/init.el b/init.el index 6ce3eb1..e2f8c42 100644 --- a/init.el +++ b/init.el | |||
@@ -1,29 +1,5 @@ | |||
1 | ;; init.el ~ acdw -*- lexical-binding: t -*- | 1 | ;; init.el ~ acdw -*- lexical-binding: t -*- |
2 | 2 | ||
3 | (setq gc-cons-threshold (* 256 1024 1024)) | ||
4 | (defvar file-name-handler-alist-old file-name-handler-alist) | ||
5 | (setq file-name-handler-alist nil) | ||
6 | (setq message-log-max 16384) | ||
7 | (setq byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local)) | ||
8 | ;; post-init | ||
9 | (add-hook 'after-init-hook | ||
10 | (lambda () | ||
11 | (setq file-name-handler-alist file-name-handler-alist-old) | ||
12 | (setq gc-cons-threshold (* 32 1024 1024))) | ||
13 | t) | ||
14 | |||
15 | (unless (display-graphic-p) | ||
16 | (tool-bar-mode -1) | ||
17 | (menu-bar-mode -1)) | ||
18 | (scroll-bar-mode -1) | ||
19 | (fringe-mode '(7 . 1)) | ||
20 | |||
21 | (setq inhibit-startup-buffer-menu t) | ||
22 | (setq inhibit-startup-screen t) | ||
23 | (setq inhibit-startup-echo-area-message "acdw") | ||
24 | (setq initial-buffer-choice t) | ||
25 | (setq initial-scratch-message nil) | ||
26 | |||
27 | (server-start) | 3 | (server-start) |
28 | 4 | ||
29 | (setq confirm-kill-processes nil) | 5 | (setq confirm-kill-processes nil) |
@@ -73,7 +49,6 @@ | |||
73 | (save-place-mode 1) | 49 | (save-place-mode 1) |
74 | 50 | ||
75 | (global-visual-line-mode 1) | 51 | (global-visual-line-mode 1) |
76 | (delight 'global-visual-line-mode) | ||
77 | 52 | ||
78 | (display-time-mode 1) | 53 | (display-time-mode 1) |
79 | 54 | ||
@@ -84,43 +59,12 @@ | |||
84 | #'display-line-numbers-mode | 59 | #'display-line-numbers-mode |
85 | #'linum-mode))) | 60 | #'linum-mode))) |
86 | 61 | ||
87 | (require 'package) | 62 | (set-face-attribute 'default nil :font "GoMono Nerd Font-11") |
88 | (setq package-user-dir (concat user-emacs-directory "elpa")) | ||
89 | (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") | ||
90 | ("melpa" . "https://melpa.org/packages/") | ||
91 | ("org" . "https://orgmode.org/elpa/"))) | ||
92 | (unless package--initialized (package-initialize)) | ||
93 | |||
94 | (unless (package-installed-p 'use-package) | ||
95 | (package-refresh-contents) | ||
96 | (package-install 'use-package)) | ||
97 | (eval-when-compile | ||
98 | (require 'use-package)) | ||
99 | |||
100 | (use-package use-package | ||
101 | :ensure | ||
102 | :config | ||
103 | (require 'use-package)) | ||
104 | |||
105 | (use-package quelpa | ||
106 | :ensure | ||
107 | :custom | ||
108 | (quelpa-git-clone-depth nil)) | ||
109 | |||
110 | (use-package quelpa-use-package | ||
111 | :ensure) | ||
112 | 63 | ||
113 | ;;; packages | 64 | ;;; packages |
114 | ;; use-package helpers | ||
115 | (use-package use-package-ensure-system-package | ||
116 | :ensure) | ||
117 | |||
118 | (use-package delight | ||
119 | :ensure) | ||
120 | 65 | ||
121 | ;; exwm | 66 | ;; exwm |
122 | (use-package exwm | 67 | (use-package exwm |
123 | :ensure | ||
124 | :demand | 68 | :demand |
125 | :custom | 69 | :custom |
126 | (exwm-layout-show-all-buffers t) | 70 | (exwm-layout-show-all-buffers t) |
@@ -178,11 +122,26 @@ | |||
178 | (require 'exwm-systemtray) | 122 | (require 'exwm-systemtray) |
179 | (exwm-systemtray-enable)) | 123 | (exwm-systemtray-enable)) |
180 | 124 | ||
125 | (use-package exwm-firefox-core | ||
126 | :after exwm | ||
127 | :straight (exwm-firefox-core | ||
128 | :type git | ||
129 | :host github | ||
130 | :repo "walseb/exwm-firefox-core")) | ||
131 | |||
132 | (use-package exwm-firefox | ||
133 | :after exwm-firefox-core | ||
134 | :straight (exwm-firefox | ||
135 | :type git | ||
136 | :host github | ||
137 | :repo "ieure/exwm-firefox") | ||
138 | :config | ||
139 | (exwm-firefox-mode)) | ||
140 | |||
181 | ;; (use-package mini-modeline | 141 | ;; (use-package mini-modeline |
182 | ;; :quelpa (mini-modeline | 142 | ;; :quelpa (mini-modeline |
183 | ;; :repo "kiennq/emacs-mini-modeline" | 143 | ;; :repo "kiennq/emacs-mini-modeline" |
184 | ;; :fetcher github) | 144 | ;; :fetcher github) |
185 | ;; :delight | ||
186 | ;; :custom | 145 | ;; :custom |
187 | ;; (mini-modeline-enhance-viusual t) | 146 | ;; (mini-modeline-enhance-viusual t) |
188 | ;; (mini-modeline-display-gui-line t) | 147 | ;; (mini-modeline-display-gui-line t) |
@@ -192,8 +151,6 @@ | |||
192 | ;; (mini-modeline-mode t)) | 151 | ;; (mini-modeline-mode t)) |
193 | 152 | ||
194 | (use-package desktop-environment | 153 | (use-package desktop-environment |
195 | :ensure | ||
196 | :delight | ||
197 | :hook (exwm-init . desktop-environment-mode) | 154 | :hook (exwm-init . desktop-environment-mode) |
198 | :custom | 155 | :custom |
199 | (desktop-environment-update-exwm-global-keys :global) | 156 | (desktop-environment-update-exwm-global-keys :global) |
@@ -214,28 +171,17 @@ | |||
214 | (desktop-environment-volume-small-decrement "dec 5")) | 171 | (desktop-environment-volume-small-decrement "dec 5")) |
215 | 172 | ||
216 | (use-package trashed | 173 | (use-package trashed |
217 | :ensure | ||
218 | :custom | 174 | :custom |
219 | (delete-by-moving-to-trash t)) | 175 | (delete-by-moving-to-trash t)) |
220 | 176 | ||
221 | (use-package switch-window | 177 | (use-package switch-window |
222 | :ensure | ||
223 | :custom | 178 | :custom |
224 | (switch-window-shortcut-style 'qwerty) | 179 | (switch-window-shortcut-style 'qwerty) |
225 | :bind | 180 | :bind |
226 | ("M-o" . switch-window)) | 181 | ("M-o" . switch-window)) |
227 | 182 | ||
228 | ;; modeline | 183 | ;; modeline |
229 | (use-package all-the-icons | ||
230 | :ensure | ||
231 | :config | ||
232 | (set-face-attribute 'mode-line nil :height 100) | ||
233 | (set-face-attribute 'mode-line-inactive nil :height 100) | ||
234 | :custom | ||
235 | (all-the-icons-scale-factor 1.0)) | ||
236 | |||
237 | (use-package doom-modeline | 184 | (use-package doom-modeline |
238 | :ensure | ||
239 | :custom | 185 | :custom |
240 | (doom-modeline-height 16) | 186 | (doom-modeline-height 16) |
241 | (doom-modeline-icon nil) | 187 | (doom-modeline-icon nil) |
@@ -249,19 +195,16 @@ | |||
249 | (doom-modeline-mode t)) | 195 | (doom-modeline-mode t)) |
250 | 196 | ||
251 | (use-package zoom | 197 | (use-package zoom |
252 | :ensure | ||
253 | :delight | ||
254 | :custom | 198 | :custom |
255 | (zoom-size '(0.618 . 0.618))) | 199 | (zoom-size '(0.618 . 0.618))) |
256 | 200 | ||
257 | ;; themes | 201 | ;; themes |
258 | (defun my/sunrise () | 202 | (defun my/sunrise () |
259 | (enable-theme 'modus-operandi) | 203 | (enable-theme 'modus-operandi) |
260 | (desktop-environment-brightness-set 60)) | 204 | (start-process-shell-command "light" nil "light -S 60")) |
261 | 205 | ||
262 | (use-package modus-operandi-theme | 206 | (use-package modus-operandi-theme |
263 | :if window-system | 207 | :if window-system |
264 | :ensure | ||
265 | :custom | 208 | :custom |
266 | (modus-operandi-theme-slanted-constructs t) | 209 | (modus-operandi-theme-slanted-constructs t) |
267 | (modus-operandi-theme-bold-constructs t) | 210 | (modus-operandi-theme-bold-constructs t) |
@@ -273,11 +216,10 @@ | |||
273 | 216 | ||
274 | (defun my/sunset () | 217 | (defun my/sunset () |
275 | (enable-theme 'modus-vivendi) | 218 | (enable-theme 'modus-vivendi) |
276 | (desktop-environment-brightness-set 35)) | 219 | (start-process-shell-command "light" nil "light -S 35")) |
277 | 220 | ||
278 | (use-package modus-vivendi-theme | 221 | (use-package modus-vivendi-theme |
279 | :if window-system | 222 | :if window-system |
280 | :ensure | ||
281 | :custom | 223 | :custom |
282 | (modus-vivendi-theme-slanted-constructs t) | 224 | (modus-vivendi-theme-slanted-constructs t) |
283 | (modus-vivendi-theme-bold-constructs t) | 225 | (modus-vivendi-theme-bold-constructs t) |
@@ -290,14 +232,11 @@ | |||
290 | 232 | ||
291 | ;; sudo | 233 | ;; sudo |
292 | (use-package su | 234 | (use-package su |
293 | :ensure | ||
294 | :config | 235 | :config |
295 | (su-mode 1)) | 236 | (su-mode 1)) |
296 | 237 | ||
297 | ;; minibuffer completion | 238 | ;; minibuffer completion |
298 | (use-package ivy | 239 | (use-package ivy |
299 | :ensure | ||
300 | :delight | ||
301 | :custom | 240 | :custom |
302 | (ivy-use-virtual-buffers t) | 241 | (ivy-use-virtual-buffers t) |
303 | (ivy-wrap t) | 242 | (ivy-wrap t) |
@@ -307,37 +246,32 @@ | |||
307 | (ivy-mode 1)) | 246 | (ivy-mode 1)) |
308 | 247 | ||
309 | (use-package swiper | 248 | (use-package swiper |
310 | :ensure | ||
311 | :delight | ||
312 | :bind ("C-s" . swiper-isearch)) | 249 | :bind ("C-s" . swiper-isearch)) |
313 | 250 | ||
314 | (use-package counsel | 251 | (use-package counsel |
315 | :ensure | ||
316 | :delight | ||
317 | :config | 252 | :config |
318 | (counsel-mode 1)) | 253 | (counsel-mode 1)) |
319 | 254 | ||
320 | (use-package ivy-rich | 255 | (use-package ivy-rich |
321 | :ensure | ||
322 | :after (ivy) | 256 | :after (ivy) |
323 | :config | 257 | :config |
324 | (ivy-rich-mode 1) | 258 | (ivy-rich-mode 1) |
325 | (setcdr (assq t ivy-format-functions-alist) #'ivy-format-function-line)) | 259 | (setcdr (assq t ivy-format-functions-alist) #'ivy-format-function-line)) |
326 | 260 | ||
327 | (use-package savehist | 261 | (use-package savehist |
328 | :ensure | ||
329 | :config | 262 | :config |
330 | (savehist-mode 1)) | 263 | (savehist-mode 1)) |
331 | 264 | ||
332 | (use-package magit | 265 | (use-package magit |
333 | :ensure | ||
334 | :bind | 266 | :bind |
335 | ("M-g" . magit)) | 267 | ("M-g" . magit)) |
336 | 268 | ||
337 | ;; mu4e | 269 | ;; mu4e |
338 | (use-package mu4e | 270 | (use-package mu4e |
339 | :ensure-system-package mu ; TODO ensure mu4e is also installed | 271 | :straight (mu4e |
340 | :load-path "/usr/share/emacs/site-lisp/mu4e" | 272 | :host github |
273 | :repo "emacsmirror/mu4e" | ||
274 | :files (:defaults "mu4e/*.el")) | ||
341 | :init | 275 | :init |
342 | (require 'smtpmail-async) | 276 | (require 'smtpmail-async) |
343 | :custom | 277 | :custom |
@@ -367,9 +301,33 @@ | |||
367 | (define-key mu4e-view-mode-map (kbd "d") 'my-move-to-trash)) | 301 | (define-key mu4e-view-mode-map (kbd "d") 'my-move-to-trash)) |
368 | 302 | ||
369 | ;; try packages out | 303 | ;; try packages out |
370 | (use-package try | 304 | ;(use-package try) |
371 | :ensure) | ||
372 | 305 | ||
373 | ;; vterm babeee | 306 | ;; vterm babeee |
374 | (use-package vterm | 307 | ;(use-package vterm) |
375 | :ensure) | 308 | |
309 | (use-package which-key | ||
310 | :custom | ||
311 | (which-key-mode 1)) | ||
312 | |||
313 | (use-package company | ||
314 | :custom | ||
315 | (company-idle-delay 0.1) | ||
316 | :hook | ||
317 | (prog-mode . company-mode)) | ||
318 | |||
319 | ;;; gemini/gopher | ||
320 | (use-package elpher | ||
321 | :straight | ||
322 | (elpher | ||
323 | :repo "git://thelambdalab.xyz/elpher.git")) | ||
324 | |||
325 | (use-package gemini-mode | ||
326 | :straight | ||
327 | (gemini-mode | ||
328 | :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) | ||
329 | |||
330 | (use-package gemini-write | ||
331 | :straight | ||
332 | (gemini-write | ||
333 | :repo "https://alexschroeder.ch/cgit/gemini-write")) | ||