<p>We discuss the packages installed in the second of three files that
make up my emacs config.</p>
<p>Since recording, I pulled in some EXWM (the Emacs X Window Manager,
that's right), even though I'm not actually using it, I'm still using
stumpWM.</p>
<p>I have also added pass, the password manager, khardel, an emacs
package for the khard CLI address book application.</p>
<p>I also moved (server-start) to this file, so that it'll only happen
when I'm on linux.</p>
<pre class="elisp"><code>;;; init-extra.el --- Extra init stuff
;;; Commentary:
;;; Stuff just for my personal laptop, not for my work laptop or termux, for example.

;;; Code:

;;;;;;;;;;;;;;;;
;;; org-roam ;;;
;;;;;;;;;;;;;;;;

(use-package org-roam
  :demand t
  :straight (:host github :repo &quot;org-roam/org-roam&quot;
             :files (:defaults &quot;extensions/*&quot;))
  :custom (org-roam-mode-sections (list #&#39;org-roam-backlinks-section
                                        #&#39;org-roam-reflinks-section
                                        #&#39;org-roam-unlinked-references-section))
  :init (setq org-roam-directory &quot;~/org/roam/&quot;
              org-roam-capture-templates
                 &#39;((&quot;o&quot; &quot;outline&quot; plain
                     &quot;%?&quot;
                     :if-new
                     (file+head &quot;${slug}.org&quot; &quot;#+title: ${title}\n#+filetags: :outline:\n&quot;)
                     :immediate-finish t
                     :unnarrowed t)
                  (&quot;r&quot; &quot;reference&quot; plain &quot;%?&quot;
                     :if-new
                     (file+head &quot;${slug}.org&quot; &quot;#+title: ${title}\n&quot;)
                     :immediate-finish t
                     :unnarrowed t)
                  (&quot;m&quot; &quot;memo&quot; entry &quot;* ${title}\n%?&quot;
                     :if-new
                     (file &quot;memos.org&quot;)
                     :immediate-finish t
                     :unnarrowed t)))
  :bind ((&quot;C-c n l&quot; . org-roam-buffer-toggle)
         (&quot;C-c n f&quot; . org-roam-node-find)
         (&quot;C-c n g&quot; . org-roam-graph)
         (&quot;C-c n i&quot; . org-roam-node-insert)
         (&quot;C-c n c&quot; . org-roam-capture)
         ;; Dailies
         (&quot;C-c n j&quot; . org-roam-dailies-capture-today))
  :config
  ;; If you&#39;re using a vertical completion framework, you might want a more informative completion interface
  (setq org-roam-node-display-template (concat &quot;${title:*} &quot; (propertize &quot;${tags:10}&quot; &#39;face &#39;org-tag)))
  (org-roam-db-autosync-mode)
  ;; If using org-roam-protocol
  (require &#39;org-roam-protocol))

;; citations
(use-package citar
  :after org-roam
  :custom (org-cite-insert-processor &#39;citar)
          (org-cite-follow-processor &#39;citar)
          (org-cite-activate-processor &#39;citar)
          (citar-bibliography &#39;(&quot;~/org/biblio.bib&quot;))
          (citar-notes-paths &#39;(&quot;~/org/roam&quot;))
          (citar-file-note-extensions &#39;(&quot;org&quot;))
  :hook (LaTeX-mode . citar-capf-setup)
        (org-mode . citar-capf-setup)
  :bind ((&quot;C-c n b&quot; . #&#39;citar-open-notes)
          :map org-mode-map :package org
          (&quot;C-c b&quot; . #&#39;org-cite-insert)))

;; view your org-roam notes on a map
(use-package org-roam-ui
  :after org-roam
  :custom (org-roam-ui-sync-theme t)
          (org-roam-ui-follow t)
          (org-roam-ui-update-on-save t)
          (org-roam-ui-open-on-start t))

;; archive web pages in org attachments
(use-package org-board
  :after org
  :custom (org-board-default-browser #&#39;browse-url)
          (org-board-property &quot;ROAM_REFS&quot;)
  :bind (:map org-mode-map
          (&quot;C-c B a&quot; . org-board-archive)
          (&quot;C-c B o&quot; . org-board-open)
          (&quot;C-c B D&quot; . org-board-delete-all)))

;;;;;;;;;;;;;;;
;;; Writing ;;;
;;;;;;;;;;;;;;;

; something like grammarly, but open source
(use-package langtool)

;; better than docview, for pdf
(use-package pdf-tools)

;; annotating docs in org files
(use-package org-noter)

;; epub
(use-package nov
 :mode (&quot;\\.epub$&quot; . nov-mode))

;;; Invoke quick emacs windows to edit anything anywhere.
;;; bind a key in xorg to ~emacsclient -c (emacs-everywhere)~
(use-package emacs-everywhere)

;;;;;;;;;;;;;;
;;; Auctex ;;;
;;;;;;;;;;;;;;
(straight-use-package &#39;( auctex
  :host nil :repo &quot;https://git.savannah.gnu.org/git/auctex.git&quot;
  :pre-build ((&quot;./autogen.sh&quot;)
                  (&quot;./configure&quot; &quot;--without-texmf-dir&quot; &quot;--with-lispdir=.&quot;)
                  (&quot;make&quot;))))

  (setq TeX-data-directory (expand-file-name &quot;straight/repos/auctex&quot; user-emacs-directory)
      TeX-lisp-directory TeX-data-directory)

  (eval-after-load &#39;info
      &#39;(add-to-list &#39;Info-additional-directory-list
          (expand-file-name &quot;straight/repos/auctex/doc&quot; user-emacs-directory)))
  (load (expand-file-name &quot;straight/repos/auctex/auctex.el&quot; user-emacs-directory) nil t t)
  (load (expand-file-name &quot;straight/repos/auctex/preview-latex.el&quot; user-emacs-directory) nil t t)

(use-package evil-tex)

(use-package latex-preview-pane
  :custom (latex-preview-pane-use-frame t))

(use-package adaptive-wrap)

;;; END AUCTEX ;;;

;;;;;;;;;;;;;;;;;;;
;;; Programming ;;;
;;;;;;;;;;;;;;;;;;;

;; downloading and viewing Dash documentation files
(use-package dash-docs
  :init (defun elisp-doc ()
            (setq-local consult-dash-docsets &#39;(&quot;Emacs Lisp&quot;)))
        (add-hook &#39;emacs-lisp-mode-hook &#39;elisp-doc)
  :custom (dash-docs-docsets-path (expand-file-name &quot;docsets&quot; user-emacs-directory))
          (dash-docs-browse-func &#39;eww))

(use-package consult-dash
  :straight (:host codeberg :repo &quot;rahguzar/consult-dash&quot;)
  :bind ((&quot;M-s d&quot; . consult-dash))
  :after consult
  :config
  ;; Use the symbol at point as initial search term
  (consult-customize consult-dash :initial (thing-at-point &#39;symbol)))

;;;;;;;;;;;;;
;;; Email ;;;
;;;;;;;;;;;;;

(use-package notmuch
  :commands notmuch
  :config (defun notmuch-show-view-html ()
            &quot;Open the text/html part of the current message using
            `notmuch-show-view-part&#39;. From https://emacs.stackexchange.com/a/63457&quot;
            (interactive)
            (save-excursion
                (goto-char (prop-match-beginning
                            (text-property-search-forward
                            :notmuch-part &quot;text/html&quot;
                            (lambda (value notmuch-part)
                                (equal (plist-get notmuch-part :content-type)
                            value)))))
            (notmuch-show-view-part)))
          ;; Enable link to message via org-store-link
          (load-file (expand-file-name &quot;org-notmuch.el&quot; user-emacs-directory))
          (require &#39;org-notmuch)
  :bind (:map notmuch-show-mode-map
              (&quot;. v&quot; . notmuch-show-view-html))
  :custom (notmuch-draft-folder &quot;local/drafts&quot;)
          (notmuch-search-oldest-first nil)
          (notmuch-fcc-dirs &quot;fastmail/sent&quot;)
          (notmuch-tagging-keys &#39;((&quot;r&quot; (&quot;+receipt&quot; &quot;-inbox&quot;) &quot;Receipt&quot;)))
          (sendmail-program (executable-find &quot;msmtp&quot;))
          (message-sendmail-f-is-evil t)
          (message-sendmail-extra-arguments &#39;(&quot;--read-envelope-from&quot;)))

(use-package khardel
  :after notmuch
  :bind (:map notmuch-message-mode-map
         (&quot;C-c M-k&quot; . khardel-insert-email)))

;;;;;;;;;;;;
;;; PASS ;;;
;;;;;;;;;;;;

(use-package pass)

;;;;;;;;;;;;
;;; EXWM ;;;
;;;;;;;;;;;;

(use-package xelb
  :disabled t
  :straight (:host github :repo &quot;ch11ng/xelb&quot;))

(use-package exwm
  :disabled t
  :straight (:host github :repo &quot;ch11ng/exwm&quot;)
  :defer t
  :config (require &#39;exwm-systemtray)
          (require &#39;exwm-randr)
          (setq xcb:connection-timeout 20)
          (exwm-systemtray-enable)
          (add-hook &#39;exwm-update-class-hook
                  (lambda ()
                  (exwm-workspace-rename-buffer exwm-class-name)))
          (add-hook &#39;exwm-randr-screen-change-hook
                    (lambda ()
                      (start-process-shell-command
                       &quot;autorandr&quot; nil &quot;autorandr -c&quot;)))
          (defun exwm-randr-mobile()
          &quot;Load a xrandr profile to use only the laptop screen.&quot;
          (interactive)
          (start-process-shell-command &quot;xrandr&quot; nil &quot;xrandr --output eDP-1 --auto --output DP-1 --off&quot;))
          (defun exwm-randr-docked()
          &quot;Load a xrandr profile to use only the connected external screen DP-1.&quot;
          (interactive)
          (start-process-shell-command &quot;xrandr&quot; nil &quot;xrandr --output eDP-1 --off --output DP-1 --auto&quot;))
          (defun exwm-randr-chair()
          &quot;Load a xrandr profile to use both the laptop screen and the connected screen.&quot;
          (interactive)
          (start-process-shell-command &quot;xrandr&quot; nil &quot;xrandr --output HDMI-1 --auto --scale 1.3 --output eDP-1 --off&quot;))
          (defun exwm-randr-all()
          &quot;Load a xrandr profile to use both the laptop screen and the connected screen.&quot;
          (interactive)
          (start-process-shell-command &quot;xrandr&quot; nil &quot;xrandr --output eDP-1 --primary --output DP-1 --above eDP-1&quot;)
          (setq exwm-randr-workspace-output-plist &#39;(0 &quot;eDP-1&quot; 1 &quot;DP-1&quot;))
          )
          (exwm-randr-enable)
    :custom (exwm-input-global-keys
              `((,(kbd &quot;s-r&quot;) . exwm-reset)
                (,(kbd &quot;s-w&quot;) . exwm-workspace-switch)
                (,(kbd &quot;s-a&quot;) . exwm-randr-all)
                (,(kbd &quot;s-c&quot;) . exwm-randr-chair)
                (,(kbd &quot;s-d&quot;) . exwm-randr-docked)
                (,(kbd &quot;s-m&quot;) . exwm-randr-mobile)
                (,(kbd &quot;s-k&quot;) . exwm-input-release-keyboard)
                (,(kbd &quot;s-f&quot;) . exwm-layout-toggle-fullscreen)
                (,(kbd &quot;s-p&quot;) . pass)
                (,(kbd &quot;s-t&quot;) . exwm-workspace-switch-to-buffer)
                (,(kbd &quot;s-&amp;&quot;) . (lambda (command)
                                       (interactive (list (read-shell-command &quot;$ &quot;)))
                                       (start-process-shell-command command nil command)))
                ,@(mapcar (lambda (i)
                       `(,(kbd (format &quot;s-%d&quot; i)) .
                           (lambda ()
                               (interactive)
                               (exwm-workspace-switch-create ,i))))
                     (number-sequence 0 9))
                ))
          )

;; start emacs server
(server-start)

;;; END ;;;

(provide &#39;init-extra)
;;; init-extra.el ends here</code></pre>
