diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 74 |
1 files changed, 62 insertions, 12 deletions
diff --git a/init.el b/init.el index da4b537..f4eac89 100644 --- a/init.el +++ b/init.el | |||
@@ -10,12 +10,20 @@ | |||
10 | 10 | ||
11 | (use-package emacs ; Misc. config | 11 | (use-package emacs ; Misc. config |
12 | :custom-face | 12 | :custom-face |
13 | (default ((t :family "Comic Code" | 13 | (fixed-pitch ((t :family ,(find-font "Comic Code" |
14 | "DejaVu Sans Mono") | ||
15 | :height 100))) | ||
16 | (variable-pitch ((t :family ,(find-font "Atkinson Hyperlegible" | ||
17 | "DejaVu Serif") | ||
18 | :height 1.4))) | ||
19 | (default ((t :family ,(find-font "Comic Code" | ||
20 | "DejaVu Sans Mono") | ||
14 | :height 100))) | 21 | :height 100))) |
15 | (variable-pitch ((t :family "Comic Code"))) | 22 | (font-lock-comment-face ((t :slant italic))) |
16 | :config | 23 | :config |
17 | (setopt tab-bar-show 1 | 24 | (setopt tab-bar-show 1 |
18 | recenter-positions '(top middle bottom))) | 25 | recenter-positions '(top middle bottom)) |
26 | (keymap-global-unset "C-\\")) | ||
19 | 27 | ||
20 | (use-package faces | 28 | (use-package faces |
21 | :defer 2 ; This is sort of expensive | 29 | :defer 2 ; This is sort of expensive |
@@ -272,7 +280,9 @@ With prefix ARG, toggle the value of | |||
272 | (visual-fill-column-mode) | 280 | (visual-fill-column-mode) |
273 | (electric-pair-local-mode -1) | 281 | (electric-pair-local-mode -1) |
274 | (auto-fill-mode -1) | 282 | (auto-fill-mode -1) |
275 | (setq-local wrap-prefix (make-string (+ 3 jabber-prefix-width) #x20))) | 283 | (setq-local wrap-prefix (make-string (+ 3 jabber-prefix-width) #x20) |
284 | visual-fill-column-extra-text-width `(,(+ 3 jabber-prefix-width) | ||
285 | . 1))) | ||
276 | :custom-face | 286 | :custom-face |
277 | (jabber-activity-face ((t :inherit jabber-chat-prompt-foreign | 287 | (jabber-activity-face ((t :inherit jabber-chat-prompt-foreign |
278 | :foreground unspecified | 288 | :foreground unspecified |
@@ -294,12 +304,13 @@ With prefix ARG, toggle the value of | |||
294 | :config | 304 | :config |
295 | (setopt jabber-account-list '(("acdw@hmm.st")) | 305 | (setopt jabber-account-list '(("acdw@hmm.st")) |
296 | jabber-auto-reconnect t | 306 | jabber-auto-reconnect t |
297 | jabber-last-read-marker (make-string 40 ?-) | 307 | jabber-last-read-marker (make-string (- fill-column 8) ?—) |
298 | jabber-muc-decorate-presence-patterns | 308 | jabber-muc-decorate-presence-patterns |
299 | '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$") | 309 | '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$" . nil) |
310 | ("Mode #.*" . jabber-muc-presence-dim) | ||
300 | ("." . jabber-muc-presence-dim)) | 311 | ("." . jabber-muc-presence-dim)) |
301 | jabber-activity-make-strings #'jabber-activity-make-strings-shorten | 312 | jabber-activity-make-strings #'jabber-activity-make-strings-shorten |
302 | jabber-last-read-marker (make-string (- fill-column 8) ?-) | 313 | jabber-last-read-marker (make-string fill-column ?-) |
303 | jabber-rare-time-format " - - - - - - %H:%M %F" | 314 | jabber-rare-time-format " - - - - - - %H:%M %F" |
304 | ;; buffer name formats | 315 | ;; buffer name formats |
305 | jabber-chat-buffer-format "%n <xmpp>" | 316 | jabber-chat-buffer-format "%n <xmpp>" |
@@ -341,6 +352,11 @@ With prefix ARG, toggle the value of | |||
341 | 352 | ||
342 | ;;; External packages | 353 | ;;; External packages |
343 | 354 | ||
355 | (use-package form-feed | ||
356 | :ensure t | ||
357 | :hook (emacs-lisp-mode-hook | ||
358 | jabber-chat-mode-hook)) | ||
359 | |||
344 | (use-package minions | 360 | (use-package minions |
345 | :ensure t | 361 | :ensure t |
346 | :config (minions-mode)) | 362 | :config (minions-mode)) |
@@ -349,7 +365,7 @@ With prefix ARG, toggle the value of | |||
349 | :ensure t | 365 | :ensure t |
350 | :init | 366 | :init |
351 | (setopt visual-fill-column-center-text t | 367 | (setopt visual-fill-column-center-text t |
352 | visual-fill-column-extra-text-width '(1 . 1)) | 368 | visual-fill-column-extra-text-width '(3 . 3)) |
353 | :config | 369 | :config |
354 | (add-hook 'visual-fill-column-mode-hook #'visual-line-mode) | 370 | (add-hook 'visual-fill-column-mode-hook #'visual-line-mode) |
355 | (add-hook 'eww-mode-hook #'visual-fill-column-mode) | 371 | (add-hook 'eww-mode-hook #'visual-fill-column-mode) |
@@ -620,7 +636,7 @@ With prefix ARG, toggle the value of | |||
620 | (push (cons (format "%s - %s" name tags) url) chans))))))))) | 636 | (push (cons (format "%s - %s" name tags) url) chans))))))))) |
621 | 637 | ||
622 | (use-package wiki-abbrev | 638 | (use-package wiki-abbrev |
623 | :defer 5 ; Allow for network to come up | 639 | :after org ; Don't need abbrevs til I load org. |
624 | :load-path "~/src/emacs/wiki-abbrev.el/" | 640 | :load-path "~/src/emacs/wiki-abbrev.el/" |
625 | :config | 641 | :config |
626 | (setopt wiki-abbrev-file (etc/ "wiki-abbrevs")) | 642 | (setopt wiki-abbrev-file (etc/ "wiki-abbrevs")) |
@@ -651,8 +667,8 @@ With PREFIX, prompt to change the current dictionary." | |||
651 | :ensure t | 667 | :ensure t |
652 | :after dired | 668 | :after dired |
653 | :bind (:map dired-mode-map | 669 | :bind (:map dired-mode-map |
654 | (("TAB" . dired-subtree-cycle) | 670 | (("TAB" . dired-subtree-cycle) |
655 | ("i" . dired-subtree-toggle)))) | 671 | ("i" . dired-subtree-toggle)))) |
656 | 672 | ||
657 | (use-package dired-hide-dotfiles | 673 | (use-package dired-hide-dotfiles |
658 | ;; I could maybe use a more general package for this ... see | 674 | ;; I could maybe use a more general package for this ... see |
@@ -661,11 +677,45 @@ With PREFIX, prompt to change the current dictionary." | |||
661 | :bind (:map dired-mode-map | 677 | :bind (:map dired-mode-map |
662 | ("." . dired-hide-dotfiles-mode))) | 678 | ("." . dired-hide-dotfiles-mode))) |
663 | 679 | ||
680 | (use-package embrace | ||
681 | :ensure t | ||
682 | :preface | ||
683 | (defmacro org-insert-or-embrace (char) | ||
684 | "Define a function to insert CHAR, or `embrace' the region with it." | ||
685 | (let* ((fn-name (intern (format "org-insert-or-embrace-%s" char))) | ||
686 | (char (cond ((characterp char) char) | ||
687 | ((stringp char) (string-to-char char)) | ||
688 | (t (user-error "Bad format for char: %S" char))))) | ||
689 | `(defun ,fn-name (n) | ||
690 | ,(format "Insert N %ss, or surround the region with them." | ||
691 | (char-to-string char)) | ||
692 | (interactive "p") | ||
693 | (if (region-active-p) | ||
694 | (dotimes (_ n) | ||
695 | (embrace--add-internal (region-beginning) (region-end) ,char) | ||
696 | (forward-char 1)) | ||
697 | (self-insert-command n ,char))))) | ||
698 | (with-eval-after-load 'org | ||
699 | (require 'embrace) | ||
700 | (keymap-set org-mode-map "*" (org-insert-or-embrace "*")) | ||
701 | (keymap-set org-mode-map "/" (org-insert-or-embrace "/")) | ||
702 | (keymap-set org-mode-map "_" (org-insert-or-embrace "_")) | ||
703 | (keymap-set org-mode-map "=" (org-insert-or-embrace "=")) | ||
704 | (keymap-set org-mode-map "~" (org-insert-or-embrace "~")) | ||
705 | (keymap-set org-mode-map "+" (org-insert-or-embrace "+"))) | ||
706 | :bind (("C-\"" . embrace-commander)) | ||
707 | :hook ((org-mode-hook . embrace-org-mode-hook) | ||
708 | (ruby-mode-hook . embrace-ruby-mode-hook) | ||
709 | (emacs-lisp-mode-hook . embrace-emacs-lisp-mode-hook) | ||
710 | (latex-mode-hook . embrace-LaTeX-mode-hook))) | ||
711 | |||
664 | 712 | ||
665 | ;;; Applications | 713 | ;;; Applications |
666 | 714 | ||
667 | (use-package acdw-mail | 715 | (use-package acdw-mail |
668 | :load-path "lisp/") | 716 | :load-path "lisp/" |
717 | :demand t | ||
718 | :bind (("C-c n" . +notmuch-goto))) | ||
669 | 719 | ||
670 | (use-package acdw-org | 720 | (use-package acdw-org |
671 | :load-path "lisp/") | 721 | :load-path "lisp/") |