[rc] add i3gs for sway's status_command
[~bandali/configs] / init.org
index 8bba36d..8a21f1a 100644 (file)
--- a/init.org
+++ b/init.org
@@ -188,6 +188,13 @@ but for now I've decided to keep them enabled. See documentation for
 ;;       '(not free-vars unresolved noruntime lexical make-local))
 #+end_src
 
 ;;       '(not free-vars unresolved noruntime lexical make-local))
 #+end_src
 
+** whoami
+
+#+begin_src emacs-lisp
+(setq user-full-name "Amin Bandali"
+      user-mail-address "amin@aminb.org")
+#+end_src
+
 ** Package management
 
 *** No =package.el=
 ** Package management
 
 *** No =package.el=
@@ -659,6 +666,8 @@ In short, my favourite way of life.
       org-html-postamble nil)
 (add-hook 'org-mode-hook 'org-indent-mode)
 (use-package htmlize)
       org-html-postamble nil)
 (add-hook 'org-mode-hook 'org-indent-mode)
 (use-package htmlize)
+(use-package org-notmuch
+  :after (:any org notmuch))
 #+end_src
 
 *** [[https://magit.vc/][Magit]]
 #+end_src
 
 *** [[https://magit.vc/][Magit]]
@@ -1094,15 +1103,23 @@ Emacs package that displays available keybindings in popup
 
 ** [[https://github.com/11111000000/tao-theme-emacs][tao-theme]]
 
 
 ** [[https://github.com/11111000000/tao-theme-emacs][tao-theme]]
 
-#+begin_src emacs-lisp
+#+begin_src emacs-lisp :tangle no
 (use-package tao-theme
   :demand t
   :config (load-theme 'tao-yang t))
 #+end_src
 
 (use-package tao-theme
   :demand t
   :config (load-theme 'tao-yang t))
 #+end_src
 
+** [[https://github.com/maio/eink-emacs][eink-theme]]
+
+#+begin_src emacs-lisp
+(load-theme 'eink t)
+#+end_src
+
 * Email
 ** [[https://notmuchmail.org][notmuch]]
 
 * Email
 ** [[https://notmuchmail.org][notmuch]]
 
+See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]].
+
 #+begin_src emacs-lisp
 (defun ab/notmuch ()
   "Delete other windows, then launch `notmuch'."
 #+begin_src emacs-lisp
 (defun ab/notmuch ()
   "Delete other windows, then launch `notmuch'."
@@ -1140,7 +1157,7 @@ Emacs package that displays available keybindings in popup
         message-send-mail-function 'message-send-mail-with-sendmail
         message-sendmail-envelope-from 'header
         message-directory "drafts"
         message-send-mail-function 'message-send-mail-with-sendmail
         message-sendmail-envelope-from 'header
         message-directory "drafts"
-        message-user-fqdn "fencepost.gnu.org")
+        message-user-fqdn "aminb.org")
   (add-hook 'message-mode-hook
             (lambda () (setq fill-column 65
                         message-fill-column 65)))
   (add-hook 'message-mode-hook
             (lambda () (setq fill-column 65
                         message-fill-column 65)))
@@ -1148,12 +1165,12 @@ Emacs package that displays available keybindings in popup
             #'flyspell-mode)
   ;; (add-hook 'notmuch-message-mode-hook #'+doom-modeline|set-special-modeline)
   ;; TODO: is there a way to only run this when replying and not composing?
             #'flyspell-mode)
   ;; (add-hook 'notmuch-message-mode-hook #'+doom-modeline|set-special-modeline)
   ;; TODO: is there a way to only run this when replying and not composing?
-  (add-hook 'notmuch-message-mode-hook
-            (lambda () (progn
-                    (newline)
-                    (newline)
-                    (forward-line -1)
-                    (forward-line -1))))
+  ;; (add-hook 'notmuch-message-mode-hook
+  ;;           (lambda () (progn
+  ;;                   (newline)
+  ;;                   (newline)
+  ;;                   (forward-line -1)
+  ;;                   (forward-line -1))))
   ;; (add-hook 'message-setup-hook
   ;;           #'mml-secure-message-sign-pgpmime)
   )
   ;; (add-hook 'message-setup-hook
   ;;           #'mml-secure-message-sign-pgpmime)
   )
@@ -1172,6 +1189,8 @@ Emacs package that displays available keybindings in popup
           notmuch-hello-insert-alltags)
         notmuch-search-oldest-first nil
         notmuch-show-all-tags-list t
           notmuch-hello-insert-alltags)
         notmuch-search-oldest-first nil
         notmuch-show-all-tags-list t
+        notmuch-message-headers  ; see bug follow-up above
+        '("Subject" "To" "Cc" "Date" "List-Id" "X-RT-Originator")
         notmuch-hello-thousands-separator ","
         notmuch-fcc-dirs
         '(("amin@aminb.org"            . "amin/Sent")
         notmuch-hello-thousands-separator ","
         notmuch-fcc-dirs
         '(("amin@aminb.org"            . "amin/Sent")
@@ -1203,6 +1222,10 @@ Emacs package that displays available keybindings in popup
                 "Search for `unread' tagged messages"
                 (interactive)
                 (notmuch-hello-search "tag:unread")))
                 "Search for `unread' tagged messages"
                 (interactive)
                 (notmuch-hello-search "tag:unread")))
+       ("l" . (lambda ()
+                "Search for `latest tagged messages"
+                (interactive)
+                (notmuch-hello-search "tag:latest")))
        ("M" . (lambda ()
                 "Compose new mail and prompt for sender"
                 (interactive)
        ("M" . (lambda ()
                 "Compose new mail and prompt for sender"
                 (interactive)
@@ -1255,6 +1278,65 @@ Emacs package that displays available keybindings in popup
   (add-to-list 'recentf-exclude (expand-file-name ab-maildir)))
 #+end_src
 
   (add-to-list 'recentf-exclude (expand-file-name ab-maildir)))
 #+end_src
 
+** supercite
+
+#+begin_src emacs-lisp :tangle no
+(use-package supercite
+  :commands sc-cite-original
+  :init
+  (add-hook 'mail-citation-hook 'sc-cite-original)
+
+  (defun sc-remove-existing-signature ()
+    (save-excursion
+      (goto-char (region-beginning))
+      (when (re-search-forward message-signature-separator (region-end) t)
+        (delete-region (match-beginning 0) (region-end)))))
+
+  (add-hook 'mail-citation-hook 'sc-remove-existing-signature)
+
+  (defun sc-remove-if-not-mailing-list ()
+    (unless (assoc "list-id" sc-mail-info)
+      (setq attribution sc-default-attribution
+            citation (concat sc-citation-delimiter
+                             sc-citation-separator))))
+
+  (add-hook 'sc-attribs-postselect-hook 'sc-remove-if-not-mailing-list)
+
+  :config
+  (defun sc-fill-if-different (&optional prefix)
+    "Fill the region bounded by `sc-fill-begin' and point.
+Only fill if optional PREFIX is different than
+`sc-fill-line-prefix'.  If `sc-auto-fill-region-p' is nil, do not
+fill region.  If PREFIX is not supplied, initialize fill
+variables.  This is useful for a regi `begin' frame-entry."
+    (if (not prefix)
+        (setq sc-fill-line-prefix ""
+              sc-fill-begin (line-beginning-position))
+      (if (and sc-auto-fill-region-p
+               (not (string= prefix sc-fill-line-prefix)))
+          (let ((fill-prefix sc-fill-line-prefix))
+            (unless (or (string= fill-prefix "")
+                        (save-excursion
+                          (goto-char sc-fill-begin)
+                          (or (looking-at ">+  +")
+                              (< (length
+                                  (buffer-substring (point)
+                                                    (line-end-position)))
+                                 65))))
+              (fill-region sc-fill-begin (line-beginning-position)))
+            (setq sc-fill-line-prefix prefix
+                  sc-fill-begin (line-beginning-position)))))
+nil))
+#+end_src
+
+* Blogging
+** [[https://ox-hugo.scripter.co][ox-hugo]]
+
+#+begin_src emacs-lisp
+(use-package ox-hugo
+  :after ox)
+#+end_src
+
 * Post initialization
 :PROPERTIES:
 :CUSTOM_ID: post-initialization
 * Post initialization
 :PROPERTIES:
 :CUSTOM_ID: post-initialization