about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-11-29 00:25:54 -0600
committerCase Duckworth2020-11-29 00:25:54 -0600
commit713cf041ebc10d9c6b4128fc2f0a4400d16cc800 (patch)
tree4eb15833e4d9d103f8d95f8acdf6380c5c51b239
parentChange frame defaults (diff)
downloademacs-713cf041ebc10d9c6b4128fc2f0a4400d16cc800.tar.gz
emacs-713cf041ebc10d9c6b4128fc2f0a4400d16cc800.zip
Update README
-rw-r--r--README.md248
1 files changed, 191 insertions, 57 deletions
diff --git a/README.md b/README.md index 6d64472..1eb5351 100644 --- a/README.md +++ b/README.md
@@ -4,8 +4,8 @@ This is my Emacs configuration. It's also a literate `org-mode` file. Yeah, I'
4# About me 4# About me
5 5
6 ;; init.el -*- lexical-binding: t -*- 6 ;; init.el -*- lexical-binding: t -*-
7 (setq user-full-name "Case Duckworth" 7 (setq user-full-name "Case Duckworth"
8 user-mail-address "acdw@acdw.net") 8 user-mail-address "acdw@acdw.net")
9 9
10 10
11# License 11# License
@@ -67,6 +67,7 @@ It's highly likely that the WTFPL is completely incompatible with the GPL, for w
67 (when (equal (buffer-file-name) 67 (when (equal (buffer-file-name)
68 (expand-file-name 68 (expand-file-name
69 (concat user-emacs-directory "config.org"))) 69 (concat user-emacs-directory "config.org")))
70 ;; Tangle and load init.el and early-init.el
70 (require 'async) 71 (require 'async)
71 (async-start 72 (async-start
72 (lambda () 73 (lambda ()
@@ -92,11 +93,12 @@ It's highly likely that the WTFPL is completely incompatible with the GPL, for w
92## Miscellaneous bootstrappy stuff 93## Miscellaneous bootstrappy stuff
93 94
94 95
95### Add `~/.emacs.d/lisp/` to `load-path` 96### Add directories to `load-path`
96 97
97 (add-to-list 'load-path 98 (dolist (dir `(,(concat user-emacs-directory
98 (concat user-emacs-directory 99 (convert-standard-filename "lisp/"))
99 (convert-standard-filename "lisp/"))) 100 ,(expand-file-name "~/Sync/elisp/")))
101 (add-to-list 'load-path dir))
100 102
101 103
102### Require my secrets 104### Require my secrets
@@ -107,8 +109,7 @@ It's highly likely that the WTFPL is completely incompatible with the GPL, for w
107# Early initiation 109# Early initiation
108 110
109 ;; early-init.el -*- lexical-binding: t; no-byte-compile: t -*- 111 ;; early-init.el -*- lexical-binding: t; no-byte-compile: t -*-
110 112 (setq load-prefer-newer t)
111 (setq load-prefer-newer t)
112 113
113 114
114## Increase the garbage collector 115## Increase the garbage collector
@@ -239,11 +240,33 @@ I also want to switch themes between night and day.
239# Simplify GUI 240# Simplify GUI
240 241
241 242
243## Frame defaults
244
245 (cuss default-frame-alist
246 '((tool-bar-lines . 0)
247 (menu-bar-lines . 0)
248 (vertical-scroll-bars . 'right)
249 (horizontal-scroll-bars . nil)
250 (right-divider-width . 2)
251 (bottom-divider-width . 2)
252 (left-fringe-width . 2)
253 (right-fringe-width . 2)))
254
255
256## Minibuffer window/frame defaults
257
258 (cuss minibuffer-frame-alist
259 '((width . 80)
260 (height . 2)
261 (vertical-scrollbars . nil)))
262
263 (set-window-scroll-bars (minibuffer-window) nil nil)
264
265
242## Remove unneeded GUI elements 266## Remove unneeded GUI elements
243 267
244 (menu-bar-mode -1) 268 (menu-bar-mode -1)
245 (tool-bar-mode -1) 269 (tool-bar-mode -1)
246 (scroll-bar-mode -1)
247 (horizontal-scroll-bar-mode -1) 270 (horizontal-scroll-bar-mode -1)
248 271
249 272
@@ -273,6 +296,17 @@ I also want to switch themes between night and day.
273 (rm/whitelist-add "^$")) 296 (rm/whitelist-add "^$"))
274 297
275 298
299## Minibuffer
300
301
302### Keep cursor from going into the prompt
303
304from [Ergo Emacs](http://ergoemacs.org/emacs/emacs_stop_cursor_enter_prompt.html).
305
306 (cuss minibuffer-prompt-properties
307 '(read-only t cursor-intangible t face minibuffer-prompt))
308
309
276## Show `^L` as a line 310## Show `^L` as a line
277 311
278 (use-package form-feed 312 (use-package form-feed
@@ -320,7 +354,7 @@ See [this StackExchange question and answer](https://emacs.stackexchange.com/que
320 (set-face-attribute 'variable-pitch nil 354 (set-face-attribute 'variable-pitch nil
321 :font 355 :font
322 (font-candidate 356 (font-candidate
323 "Libertinus Serif-14" 357 "Libertinus Serif-13"
324 "Linux Libertine O-12" 358 "Linux Libertine O-12"
325 "Georgia-11")) 359 "Georgia-11"))
326 360
@@ -912,46 +946,6 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#org-return-dwim)
912 (add-hook 'prog-mode-hook #'acdw/enable-line-numbers) 946 (add-hook 'prog-mode-hook #'acdw/enable-line-numbers)
913 947
914 948
915## Git
916
917 (use-package magit
918 :bind
919 ("C-x g" . magit-status)
920 :custom-update
921 (magit-no-confirm '(stage-all-changes)))
922
923
924### Hook into `prescient`
925
926 (define-advice magit-list-refs
927 (:around (orig &optional namespaces format sortby)
928 prescient-sort)
929 "Apply prescient sorting when listing refs."
930 (let ((res (funcall orig namespaces format sortby)))
931 (if (or sortby
932 magit-list-refs-sortby
933 (not selectrum-should-sort-p))
934 res
935 (prescient-sort res))))
936
937
938### Use `libgit` when I can build it (requires `cmake`)
939
940 (when (executable-find "cmake")
941 (use-package libgit)
942 (use-package magit-libgit))
943
944
945### Git "forge" capabilities
946
947 (use-package forge
948 :after magit
949 :unless (eq system-type 'windows-nt)
950 :custom
951 (forge-owned-accounts
952 '(("duckwork"))))
953
954
955## Programming languages 949## Programming languages
956 950
957 951
@@ -1000,12 +994,74 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#org-return-dwim)
1000### Go 994### Go
1001 995
1002 (use-package go-mode 996 (use-package go-mode
1003 :mode "\\.go\\'") 997 :mode "\\.go\\'"
998 :hook
999 (before-save . gofmt-before-save))
1004 1000
1005 1001
1006# Applications 1002# Applications
1007 1003
1008 1004
1005## Git
1006
1007 (use-package magit
1008 :bind
1009 ("C-x g" . magit-status)
1010 :custom-update
1011 (magit-no-confirm '(stage-all-changes)))
1012
1013
1014### Hook into `prescient`
1015
1016 (define-advice magit-list-refs
1017 (:around (orig &optional namespaces format sortby)
1018 prescient-sort)
1019 "Apply prescient sorting when listing refs."
1020 (let ((res (funcall orig namespaces format sortby)))
1021 (if (or sortby
1022 magit-list-refs-sortby
1023 (not selectrum-should-sort-p))
1024 res
1025 (prescient-sort res))))
1026
1027
1028### Use `libgit` when I can build it (requires `cmake`)
1029
1030 (when (executable-find "cmake")
1031 (use-package libgit)
1032 (use-package magit-libgit))
1033
1034
1035### Git "forge" capabilities
1036
1037 (use-package forge
1038 :after magit
1039 :unless (eq system-type 'windows-nt)
1040 :custom
1041 (forge-owned-accounts
1042 '(("duckwork"))))
1043
1044
1045## Dired
1046
1047 (with-eval-after-load 'dired
1048 (cuss dired-dwim-target t)
1049 (cuss dired-listing-switches "-alDh")
1050
1051 (cuss wdired-allow-to-change-permissions t)
1052 (bind-key "C-c w" #'wdired-change-to-wdired-mode 'dired-mode-map))
1053
1054
1055## Proced
1056
1057 (defun acdw/setup-proced ()
1058 (variable-pitch-mode -1)
1059 (toggle-truncate-lines 1)
1060 (proced-toggle-auto-update 1))
1061
1062 (add-hook 'proced-mode-hook #'acdw/setup-proced)
1063
1064
1009## Elpher 1065## Elpher
1010 1066
1011 (use-package elpher 1067 (use-package elpher
@@ -1066,12 +1122,90 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#org-return-dwim)
1066 1122
1067## Pastebin (0x0) 1123## Pastebin (0x0)
1068 1124
1069(use-package 0x0 1125 (use-package 0x0
1070 :custom 1126 :custom
1071 (0x0-default-service 'ttm)) 1127 (0x0-default-service 'ttm))
1128
1129
1130## Mu4e
1131
1132 (when (executable-find "mu")
1133 (add-to-list 'load-path
1134 "/usr/share/emacs/site-lisp/mu4e")
1135 (require 'mu4e)
1136
1137 (cuss mail-user-agent 'mu4e-user-agent)
1138
1139 (cuss mu4e-headers-skip-duplicates t)
1140 (cuss mu4e-view-show-images t)
1141 (cuss mu4e-view-show-addresses t)
1142 (cuss mu4e-compose-format-flowed t)
1143 (cuss mu4e-change-filenames-when-moving t)
1144 (cuss mu4e-attachments-dir "~/Downloads")
1145
1146 (cuss mu4e-maildir "~/.mail/fastmail")
1147 (cuss mu4e-refile-folder "/Archive")
1148 (cuss mu4e-sent-folder "/Sent")
1149 (cuss mu4e-drafts-folder "/Drafts")
1150 (cuss mu4e-trash-folder "/Trash")
1151
1152 (fset 'my-move-to-trash "mTrash")
1153 (define-key mu4e-headers-mode-map (kbd "d") 'my-move-to-trash)
1154 (define-key mu4e-view-mode-map (kbd "d") 'my-move-to-trash)
1155
1156 (cuss message-send-mail-function 'smtpmail-send-it)
1157 (cuss smtpmail-default-smtp-server "smtp.fastmail.com")
1158 (cuss smtpmail-smtp-server "smtp.fastmail.com")
1159 (cuss smtpmail-stream-type 'ssl)
1160 (cuss smtpmail-smtp-service 465)
1161 (cuss smtpmail-local-domain "acdw.net")
1162 (cuss mu4e-compose-signature
1163 "Best,\nCase\n")
1164
1165 (cuss mu4e-get-mail-command "mbsync -a")
1166 (cuss mu4e-update-interval 300)
1167
1168 (cuss mu4e-completing-read-function 'completing-read)
1169 (cuss message-kill-buffer-on-exit t)
1170 (cuss mu4e-confirm-quit nil)
1171
1172 (cuss mu4e-bookmarks
1173 '((
1174 :name "Unread"
1175 :query
1176 "flag:unread AND NOT flag:trashed AND NOT maildir:/Spam"
1177 :key ?u)
1178 (
1179 :name "Today"
1180 :query "date:today..now and not maildir:/Spam"
1181 :key ?t)
1182 (
1183 :name "This week"
1184 :query "date:7d..now and not maildir:/Spam"
1185 :hide-unread t
1186 :key ?w)))
1187
1188 (cuss mu4e-headers-fields
1189 '((:human-date . 12)
1190 (:flags . 6)
1191 (:mailing-list . 10)
1192 (:from-or-to . 22)
1193 (:subject)))
1194 )
1195
1196 ;; not sure about this...
1197 (use-package mu4e-dashboard
1198 :straight (mu4e-dashboard
1199 :host github
1200 :repo "rougier/mu4e-dashboard"
1201 :branch "main"))
1202
1072 1203
1204# Appendix A: `emacsdc` script
1073 1205
1074## EMMS 1206Here's a wrapper script that'll start `emacs --daemon` if there isn't one, and then launche `emacsclient` on the arguments. I'd recommend installing with `ln -s emacsdc ~/.local/bin/` or something. Then you can set it as your `$EDITOR`!
1075 1207
1076 (use-package bongo 1208if ! emacsclient -nc "$@" 2>/dev/null; then
1077 :commands 'bongo) 1209 emacs --daemon
1210 emacsclient -nc "$@"
1211 fi