X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/c1fb22abb913c58b7410207c6d2e20a5d1bb5292..2e26b949472bd0e3be623251cdea0a872d9cc1d4:/.emacs.d/init.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e029be7..371a9a3 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -18,7 +18,7 @@ ;;; Commentary: ;; Emacs configuration of Amin Bandali, computer scientist, functional -;; programmer, and free software advocate. Uses straight.el for +;; programmer, and free software activist. Uses straight.el for ;; purely functional and fully reproducible package management. ;; Over the years, I've taken inspiration from configurations of many @@ -74,7 +74,7 @@ ;;; whoami (setq user-full-name "Amin Bandali" - user-mail-address "amin@shemshak.org") + user-mail-address "mab@shemshak.org") ;;; comment macro @@ -295,7 +295,19 @@ For disabling the behaviour for certain buffers and/or modes." :config (pixel-scroll-mode 1)) ;; ask for GPG passphrase in minibuffer -(setq epg-pinentry-mode 'loopback) +(use-feature epg-config + :defer 0.4 + :custom + ((epg-gpg-program (executable-find "gpg")) + (epg-pinentry-mode 'loopback))) +(use-feature epg + :after epg-config) +(use-package pinentry + :demand + :after (epg server) + :config + (setq pinentry--socket-dir server-socket-dir) + (pinentry-start)) ;; useful libraries (require 'cl-lib) @@ -557,6 +569,7 @@ For disabling the behaviour for certain buffers and/or modes." org-catch-invisible-edits 'show-and-error org-log-done 'time) (add-to-list 'org-structure-template-alist '("L" . "src emacs-lisp") t) + (add-to-list 'org-modules 'org-habit) :bind (("C-c a o a" . org-agenda) :map org-mode-map @@ -568,8 +581,11 @@ For disabling the behaviour for certain buffers and/or modes." (org-mode . flyspell-mode)) :custom (org-agenda-files '("~/usr/org/todos/personal.org" + "~/usr/org/todos/habits.org" "~/usr/org/todos/masters.org")) (org-agenda-start-on-weekday 0) + (org-agenda-time-leading-zero t) + (org-habit-graph-column 44) (org-latex-packages-alist '(("" "listings") ("" "color"))) :custom-face '(org-block-begin-line ((t (:foreground "#5a5b5a" :background "#1d1f21")))) @@ -1213,6 +1229,10 @@ For disabling the behaviour for certain buffers and/or modes." (use-package go-mode) +(use-package po-mode + :hook + (po-mode . (lambda () (run-with-timer 0.1 nil 'View-exit)))) + ;;; Theme @@ -1631,6 +1651,11 @@ For disabling the behaviour for certain buffers and/or modes." ("s-K" . windmove-swap-states-up) ("s-L" . windmove-swap-states-right))) +(use-package pass + :commands pass + :bind ("C-c a p" . pass) + :hook (pass-mode . View-exit)) + ;;; Email (with Gnus) @@ -1650,12 +1675,12 @@ For disabling the behaviour for certain buffers and/or modes." (setq gnus-select-method '(nnnil "") gnus-secondary-select-methods - '((nnimap "amin" + '((nnimap "shemshak" (nnimap-stream plain) (nnimap-address "127.0.0.1") (nnimap-server-port 143) (nnimap-authenticator plain) - (nnimap-user "amin@shemshak.local")) + (nnimap-user "mab@shemshak.local")) (nnimap "gnu" (nnimap-stream plain) (nnimap-address "127.0.0.1") @@ -1725,7 +1750,7 @@ For disabling the behaviour for certain buffers and/or modes." (nnimap-server-port 143) (nnimap-authenticator plain) (nnimap-user "abandali@csc.uw.local"))) - gnus-message-archive-group "nnimap+amin:Sent" + gnus-message-archive-group "nnimap+shemshak:Sent" gnus-parameters '(("l\\.deepspec" (to-address . "deepspec@lists.cs.princeton.edu") @@ -1858,6 +1883,7 @@ For disabling the behaviour for certain buffers and/or modes." (use-feature gnus-art :config (setq + gnus-buttonized-mime-types '("multipart/\\(signed\\|encrypted\\)") gnus-visible-headers (concat gnus-visible-headers "\\|^List-Id:\\|^X-RT-Originator:\\|^User-Agent:") gnus-sorted-header-list @@ -1897,19 +1923,24 @@ For disabling the behaviour for certain buffers and/or modes." (use-feature gnus-msg :config + (defvar mab/signature "Amin Bandali +Free Software Activist | GNU Webmaster & Volunteer +GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103 +https://shemshak.org/~mab") (defvar mab/uw-signature "Amin Bandali, MMath Student Cheriton School of Computer Science University of Waterloo -https://shemshak.org/~amin") +https://shemshak.org/~mab") (defvar mab/csc-signature "Amin Bandali Termcom, Computer Science Club University of Waterloo -https://shemshak.org/~amin") +https://shemshak.org/~mab") (setq gnus-posting-styles '((".*" - (address "amin@shemshak.org") + (address "mab@shemshak.org") (body "\nBest,\n") - (eval (setq a/message-cite-say-hi t))) + (signature mab/signature) + (eval (setq mab/message-cite-say-hi t))) ("nnimap\\+gnu:.*" (address "mab@gnu.org") (organization "GNU Project") @@ -1956,7 +1987,9 @@ https://shemshak.org/~amin") (use-feature mm-decode :config - (setq mm-discouraged-alternatives '("text/html" "text/richtext"))) + (setq mm-discouraged-alternatives '("text/html" "text/richtext") + mm-decrypt-option 'known + mm-verify-option 'known)) (use-feature sendmail :config @@ -1997,7 +2030,7 @@ https://shemshak.org/~amin") message-subscribed-address-functions '(gnus-find-subscribed-addresses) message-dont-reply-to-names - "\\(\\(amin@\\(shemshak\\|bndl\\)\\.org\\)\\|\\(.*@aminb\\.org\\)\\|\\(\\(mab\\|bandali\\|aminb?\\)@gnu\\.org\\)\\|\\(a\\(min\\.\\)?bandali@uwaterloo\\.ca\\)\\|\\(abandali@csclub\\.uwaterloo\\.ca\\)\\)") + "\\(\\(\\(mab\\|amin\\)@shemshak\\.org\\)\\|\\(amin@bndl\\.org\\)\\|\\(.*@aminb\\.org\\)\\|\\(\\(mab\\|bandali\\|aminb?\\)@gnu\\.org\\)\\|\\(a\\(min\\.\\)?bandali@uwaterloo\\.ca\\)\\|\\(abandali@csclub\\.uwaterloo\\.ca\\)\\)") (require 'company-ebdb) :hook (;; (message-setup . mml-secure-message-sign-pgpmime) (message-mode . flyspell-mode) @@ -2165,7 +2198,7 @@ https://shemshak.org/~amin") :after erc) (use-package znc - :straight (:host nil :repo "https://git.shemshak.org/amin/znc.el") + :straight (:host nil :repo "https://git.shemshak.org/mab/znc.el") :bind (("C-c a e e" . znc-erc) ("C-c a e a" . znc-all)) :config @@ -2175,11 +2208,11 @@ https://shemshak.org/~amin") (t (funcall (plist-get (car auth) :secret))))))) (setq znc-servers `(("znc.shemshak.org" 1337 t - ((freenode "amin/freenode" ,pwd))) + ((freenode "mab/freenode" ,pwd))) ("znc.shemshak.org" 1337 t - ((moznet "amin/moznet" ,pwd))) + ((moznet "mab/moznet" ,pwd))) ("znc.shemshak.org" 1337 t - ((oftc "amin/oftc" ,pwd))))))) + ((oftc "mab/oftc" ,pwd))))))) ;;; Post initialization