emacs: gnus: update some signatures
[~bandali/configs] / .emacs.d / init.el
index 746ca44..dafb120 100644 (file)
 \f
 ;;; Initial setup
 
+(defvar b/exwm-p (string= (system-name) "jirud")
+  "Whether or not we will be using `exwm'.")
+
 ;; keep ~/.emacs.d clean
 (use-package no-littering
   :demand
@@ -394,7 +397,7 @@ For disabling the behaviour for certain buffers and/or modes."
 
 ;; time and battery in mode-line
 (use-feature time
-  :disabled
+  :if b/exwm-p
   :demand
   :config
   (display-time-mode)
@@ -403,7 +406,7 @@ For disabling the behaviour for certain buffers and/or modes."
   (display-time-format "%a %b %-e, %-l:%M%P"))
 
 (use-feature battery
-  :disabled
+  :if b/exwm-p
   :demand
   :config
   (display-battery-mode)
@@ -568,7 +571,7 @@ For disabling the behaviour for certain buffers and/or modes."
 ;;; Essential packages
 
 (use-package exwm
-  :disabled
+  :if b/exwm-p
   :demand
   :config
   ;; make class name the buffer name, truncating beyond 60 characters
@@ -764,18 +767,7 @@ around if needed."
   :config
   (exwm-randr-enable)
   :custom
-  (exwm-randr-workspace-monitor-plist '(1 "VGA-1"))
-  :hook
-  (exwm-randr-screen-change . (lambda ()
-                                (let ((xrandr
-                                       (string-join
-                                        '("xrandr"
-                                          "--output VGA-1"
-                                          "--same-as LVDS-1"
-                                          "--auto")
-                                        " ")))
-                                  (start-process-shell-command
-                                   "xrandr" nil xrandr)))))
+  (exwm-randr-workspace-monitor-plist '(1 "VGA-1")))
 
 (use-feature exwm-systemtray
   :demand
@@ -1257,7 +1249,6 @@ This function is intended for use with `ivy-ignore-buffers'."
   :mode "\\.bashrc$")
 
 (use-package company
-  :defer 0.6
   :bind
   (:map company-active-map
         ([tab]    . company-complete-common-or-cycle)
@@ -1517,10 +1508,10 @@ This function is intended for use with `ivy-ignore-buffers'."
 (load-theme 'tangomod t)
 
 (use-package smart-mode-line
-  :disabled
   :commands (sml/apply-theme)
   :demand
   :config
+  (setq sml/theme 'tangomod)
   (sml/setup)
   (smart-mode-line-enable))
 
@@ -1539,6 +1530,7 @@ This function is intended for use with `ivy-ignore-buffers'."
   (load-theme 'solarized-light t))
 
 (use-package moody
+  :disabled
   :demand
   :config
   (setq x-underline-at-descent-line t)
@@ -1569,18 +1561,22 @@ This function is intended for use with `ivy-ignore-buffers'."
   (interactive)
   (mapc #'disable-theme custom-enabled-themes)
   (load-theme 'tangomod t)
-  ;; (sml/apply-theme 'automatic)
+  (sml/apply-theme 'tangomod)
   (font-lock-remove-keywords
-   'org-mode b/org-mode-font-lock-keywords))
+   'org-mode b/org-mode-font-lock-keywords)
+  (when (featurep 'exwm-systemtray)
+    (exwm-systemtray--refresh)))
 
 (defun b/lights-off ()
   "Go dark."
   (interactive)
   (mapc #'disable-theme custom-enabled-themes)
   (load-theme 'doom-one t)
-  ;; (sml/apply-theme 'automatic)
+  (sml/apply-theme 'automatic)
   (font-lock-add-keywords
-   'org-mode b/org-mode-font-lock-keywords t))
+   'org-mode b/org-mode-font-lock-keywords t)
+  (when (featurep 'exwm-systemtray)
+    (exwm-systemtray--refresh)))
 
 (bind-keys
  ("C-c t d" . b/lights-off)
@@ -1903,11 +1899,18 @@ This function is intended for use with `ivy-ignore-buffers'."
 
 (use-feature window
   :bind
-  (("C-c w <right>" . split-window-right)
-   ("C-c w <down>"  . split-window-below)
-   ("C-c w s l"     . split-window-right)
-   ("C-c w s j"     . split-window-below)
-   ("C-c w q"       . quit-window))
+  (("C-c w s l" . b/split-window-right)
+   ("C-c w s j" . b/split-window-below)
+   ("C-c w q"   . quit-window))
+  :init
+  (defun b/split-window-right ()
+    (interactive)
+    (split-window-right)
+    (other-window 1))
+  (defun b/split-window-below ()
+    (interactive)
+    (split-window-below)
+    (other-window 1))
   :custom
   (split-width-threshold 150))
 
@@ -1937,7 +1940,9 @@ This function is intended for use with `ivy-ignore-buffers'."
               ("<C-XF86Forward>" . pdf-history-forward)
               ("<mouse-9>"       . pdf-history-forward)
               ("<drag-mouse-9>"  . pdf-history-forward)
-              ("M-RET"           . image-previous-line))
+              ("M-RET"           . image-previous-line)
+              ("C-s"             . isearch-forward)
+              ("s s"             . isearch-forward))
   :config (pdf-tools-install nil t)
   :custom (pdf-view-resize-factor 1.05))
 
@@ -1994,6 +1999,13 @@ This function is intended for use with `ivy-ignore-buffers'."
   :custom
   (nnreddit-python-command "python3"))
 
+(use-package hyperbole
+  :disabled
+  :straight (hyperbole
+             :host github :repo "rswgnu/hyperbole"
+             :files ("*.el" ("kotl" "kotl/*.el")
+                     "DEMO" "man/*.info" "man/*.texi")))
+
 \f
 ;;; Email (with Gnus)
 
@@ -2097,6 +2109,9 @@ This function is intended for use with `ivy-ignore-buffers'."
      ("l\\.emacs-tangents"
       (to-address . "emacs-tangents@gnu.org")
       (to-list    . "emacs-tangents@gnu.org"))
+     ("l\\.emacsconf-committee"
+      (to-address . "emacsconf-committee@gnu.org")
+      (to-list    . "emacsconf-committee@gnu.org"))
      ("l\\.emacsconf-discuss"
       (to-address . "emacsconf-discuss@gnu.org")
       (to-list    . "emacsconf-discuss@gnu.org"))
@@ -2275,14 +2290,12 @@ This function is intended for use with `ivy-ignore-buffers'."
 
 (use-feature gnus-msg
   :config
-  (defvar b/signature "Amin Bandali
-Free Software Activist | GNU Webmaster & Volunteer
-GPG: BE62 7373 8E61 6D6D 1B3A  08E8 A21A 0202 4881 6103
-https://shemshak.org/~amin")
   (defvar b/gnu-signature "Amin Bandali
-Free Software Activist | GNU Webmaster & Volunteer
+Free Software Activist | GNU Maintainer & Webmaster
 GPG: BE62 7373 8E61 6D6D 1B3A  08E8 A21A 0202 4881 6103
 https://bandali.eu.org")
+  (defvar b/shemshak-signature "Amin Bandali
+https://shemshak.org/~amin")
   (defvar b/uw-signature "Amin Bandali, MMath Student
 Cheriton School of Computer Science
 University of Waterloo
@@ -2296,25 +2309,29 @@ https://csclub.uwaterloo.ca/~abandali")
            (address "bandali@gnu.org")
            (signature b/gnu-signature)
            (eval (set (make-local-variable 'message-user-fqdn) "fencepost.gnu.org")))
+          ("nnimap\\+gnu:l\\..*"
+           (signature nil))
+          ((header "subject" "ThankCRM")
+           (to "webmasters-comment@gnu.org")
+           (body "")
+           (eval (setq b/message-cite-say-hi nil)))
           ("nnimap\\+shemshak:.*"
            (address "amin@shemshak.org")
            (body "\nBest,\n")
-           (signature b/signature)
+           (signature b/shemshak-signature)
            (gcc "nnimap+shemshak:Sent")
            (eval (setq b/message-cite-say-hi t)))
-          ((header "subject" "ThankCRM")
-           (to "webmasters-comment@gnu.org")
-           (body "")
-           (eval (setq b/message-cite-say-hi nil)))
           ("nnimap\\+uw:.*"
            (address "bandali@uwaterloo.ca")
+           (body "\nBest,\n")
            (signature b/uw-signature))
           ("nnimap\\+uw:INBOX"
            (gcc "\"nnimap+uw:Sent Items\""))
           ("nnimap\\+csc:.*"
            (address "bandali@csclub.uwaterloo.ca")
            (signature b/csc-signature)
-           (gcc "nnimap+csc:Sent")))))
+           (gcc "nnimap+csc:Sent"))))
+  :hook (gnus-message-setup . mml-secure-message-sign))
 
 (use-feature gnus-topic
   :hook (gnus-group-mode . gnus-topic-mode)
@@ -2453,7 +2470,6 @@ https://csclub.uwaterloo.ca/~abandali")
   (defun company-ebdb--post-complete (_) nil))
 
 (use-feature ebdb-gnus
-  :demand
   :after ebdb
   :custom
   (ebdb-gnus-window-size 0.3))