summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-08-29 23:08:45 -0500
committerCase Duckworth2020-08-29 23:08:45 -0500
commit419dc3a6fc90f7e52cb8eb93c6031c18393b071f (patch)
treecbd75ec4c810658cb208d98c9ef38cb97d61c3da
parentAdd init.el (diff)
downloademacs-419dc3a6fc90f7e52cb8eb93c6031c18393b071f.tar.gz
emacs-419dc3a6fc90f7e52cb8eb93c6031c18393b071f.zip
Change package bootstrapping
-rw-r--r--init.el79
1 files changed, 54 insertions, 25 deletions
diff --git a/init.el b/init.el index 53deb3f..c605a4d 100644 --- a/init.el +++ b/init.el
@@ -6,24 +6,27 @@
6;;; bootstrap packages 6;;; bootstrap packages
7(require 'package) 7(require 'package)
8(setq package-user-dir (concat user-emacs-directory "elpa")) 8(setq package-user-dir (concat user-emacs-directory "elpa"))
9(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")) 9(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
10(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) 10 ("melpa" . "https://melpa.org/packages/")
11(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) 11 ("org" . "https://orgmode.org/elpa/")))
12(unless package--initialized (package-initialize)) 12(unless package--initialized (package-initialize))
13;; bootstrap quelpa 13
14(unless (package-installed-p 'quelpa) 14(unless (package-installed-p 'use-package)
15 (with-temp-buffer 15 (package-refresh-contents)
16 (url-insert-file-contents "https://raw.githubusercontent.com/quelpa/quelpa/master/quelpa.el") 16 (package-install 'use-package))
17 (eval-buffer) 17(eval-when-compile
18 (quelpa-self-upgrade))) 18 (require 'use-package))
19;; quelpa config 19
20(setq quelpa-git-clone-depth nil) 20(use-package use-package
21;; quelpa-use-package 21 :ensure
22(quelpa 22 :config
23 '(quelpa-use-package 23 (require 'use-package))
24 :fetcher git 24
25 :url "https://github.com/quelpa/quelpa-use-package.git")) 25(use-package quelpa
26(require 'quelpa-use-package) 26 :ensure)
27
28(use-package quelpa-use-package
29 :ensure)
27 30
28;;; packages 31;;; packages
29;; use-package helpers 32;; use-package helpers
@@ -42,8 +45,6 @@
42 '((:eval (if (buffer-file-name) 45 '((:eval (if (buffer-file-name)
43 (abbreviate-file-name (buffer-file-name)) 46 (abbreviate-file-name (buffer-file-name))
44 "%b")))) 47 "%b"))))
45 (display-time-format " %H:%M ")
46 (display-time-default-load-average nil)
47 (show-paren-style 'mixed) 48 (show-paren-style 'mixed)
48 (backup-directory-alist 49 (backup-directory-alist
49 `((".*" . ,(concat user-emacs-directory "saves/")))) 50 `((".*" . ,(concat user-emacs-directory "saves/"))))
@@ -55,13 +56,12 @@
55 `((".*" ,(concat user-emacs-directory "saves/") t))) 56 `((".*" ,(concat user-emacs-directory "saves/") t)))
56 (create-lockfiles nil) 57 (create-lockfiles nil)
57 (scroll-conservatively 100) 58 (scroll-conservatively 100)
59 (calendar-location-name "Baton Rouge, LA")
58 (calendar-latitude 30.39) 60 (calendar-latitude 30.39)
59 (calendar-longitude -91.83) 61 (calendar-longitude -91.83)
60 (show-paren-style 'mixed) 62 (show-paren-style 'mixed)
63 (save-place-file (expand-file-name "places" user-emacs-directory))
61 :config 64 :config
62 (display-time-mode 1)
63 (line-number-mode 1)
64 (column-number-mode 1)
65 (blink-cursor-mode 0) 65 (blink-cursor-mode 0)
66 (delete-selection-mode 1) 66 (delete-selection-mode 1)
67 (global-auto-revert-mode t) 67 (global-auto-revert-mode t)
@@ -76,6 +76,8 @@
76 (scroll-bar-mode -1) 76 (scroll-bar-mode -1)
77 (fringe-mode 1) 77 (fringe-mode 1)
78 (show-paren-mode 1) 78 (show-paren-mode 1)
79 (global-visual-line-mode 1)
80 (save-place-mode 1)
79 :hook 81 :hook
80 ((beforpe-save . delete-trailing-whitespace) 82 ((beforpe-save . delete-trailing-whitespace)
81 (prog-mode . (lambda () 83 (prog-mode . (lambda ()
@@ -84,12 +86,26 @@
84 #'display-line-numbers-mode 86 #'display-line-numbers-mode
85 #'linum-mode)))) 87 #'linum-mode))))
86 :bind 88 :bind
87 (("C-z" . nil))) 89 (("C-z" . nil)
90 ("M-1" . delete-other-windows)
91 ("M-o" . mode-line-other-buffer)))
92
93;; async
94(use-package async
95 :ensure)
88 96
89;; delight 97;; delight
90(use-package delight 98(use-package delight
91 :ensure) 99 :ensure)
92 100
101;; startup buffer
102(use-package dashboard
103 :ensure
104 :custom
105 (initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
106 :config
107 (dashboard-setup-startup-hook))
108
93;; modeline 109;; modeline
94(use-package all-the-icons 110(use-package all-the-icons
95 :ensure 111 :ensure
@@ -108,6 +124,10 @@
108 (doom-modeline-gnus nil) 124 (doom-modeline-gnus nil)
109 (doom-modeline-irc t) 125 (doom-modeline-irc t)
110 :config 126 :config
127 (display-time-mode 1)
128 (line-number-mode 1)
129 (column-number-mode 1)
130 (display-battery-mode 1)
111 (doom-modeline-mode t)) 131 (doom-modeline-mode t))
112 132
113;; themes 133;; themes
@@ -243,6 +263,8 @@
243(use-package mu4e 263(use-package mu4e
244 :ensure-system-package mu ; TODO ensure mu4e is also installed 264 :ensure-system-package mu ; TODO ensure mu4e is also installed
245 :load-path "/usr/share/emacs/site-lisp/mu4e" 265 :load-path "/usr/share/emacs/site-lisp/mu4e"
266 :init
267 (require 'smtpmail-async)
246 :custom 268 :custom
247 (mu4e-headers-skip-duplicates t) 269 (mu4e-headers-skip-duplicates t)
248 (mu4e-view-show-images t) 270 (mu4e-view-show-images t)
@@ -259,7 +281,7 @@
259 (mu4e-sent-folder "/Sent") 281 (mu4e-sent-folder "/Sent")
260 (mu4e-drafts-folder "/Drafts") 282 (mu4e-drafts-folder "/Drafts")
261 (mu4e-trash-folder "/Trash") 283 (mu4e-trash-folder "/Trash")
262 (message-send-mail-function 'smtpmail-send-it) 284 (message-send-mail-function 'async-smtpmail-send-it)
263 (smtpmail-default-smtp-server "smtp.fastmail.com") 285 (smtpmail-default-smtp-server "smtp.fastmail.com")
264 (smtpmail-smtp-server "smtp.fastmail.com") 286 (smtpmail-smtp-server "smtp.fastmail.com")
265 (smtpmail-smtp-service 465) 287 (smtpmail-smtp-service 465)
@@ -338,7 +360,14 @@
338 (lambda () "Disable simulation keys for Firefox" 360 (lambda () "Disable simulation keys for Firefox"
339 (when (and exwm-class-name 361 (when (and exwm-class-name
340 (string= exwm-class-name "Firefox")) 362 (string= exwm-class-name "Firefox"))
341 (exwm-input-set-local-simulation-keys nil))))) 363 (exwm-input-set-local-simulation-keys nil))))
364 (exwm-init .
365 (lambda () "Autostart"
366 (start-process-shell-command "cmst" nil "cmst -m -w 5")
367 (start-process-shell-command "keepassxc" nil "keepassxc")
368 (start-process-shell-command "pa-applet" nil
369 "pa-applet --disable-key-grabbing --disable-notifications")
370 (start-process-shell-command "picom" nil "picom"))))
342 :config 371 :config
343 (exwm-enable) 372 (exwm-enable)
344 (require 'exwm-systemtray) 373 (require 'exwm-systemtray)