Merge branch 'master' of gitlab.com:chriscochrun/dotemacs

This commit is contained in:
Chris Cochrun 2021-05-04 10:10:16 -05:00
commit 337d843930
2 changed files with 482 additions and 488 deletions

View file

@ -74,6 +74,7 @@ Let's start by making some basic ui changes like turning off the scrollbar, tool
(menu-bar-mode -1) (menu-bar-mode -1)
(blink-cursor-mode -1) (blink-cursor-mode -1)
(column-number-mode +1) (column-number-mode +1)
(setq-default indent-tabs-mode nil)
#+end_src #+end_src
In order to have this config work on both my desktop with regular joe-schmoe monitors and my laptop with new-hotness HiDPI monitor, I will set the font size if my system is the laptop to much higher. In order to have this config work on both my desktop with regular joe-schmoe monitors and my laptop with new-hotness HiDPI monitor, I will set the font size if my system is the laptop to much higher.
@ -91,7 +92,7 @@ In order to have this config work on both my desktop with regular joe-schmoe mon
:height chris/default-font-size) :height chris/default-font-size)
(set-face-attribute 'variable-pitch nil :font "Cantarell" (set-face-attribute 'variable-pitch nil :font "Cantarell"
:height (+ chris/default-font-size (/ chris/default-font-size 8)) :height (+ chris/default-font-size (/ chris/default-font-size 8))
:weight 'regular)) :weight 'regular))
(defun chris/set-transparency () (defun chris/set-transparency ()
"Set the frame to be transparent on Wayland compositors" "Set the frame to be transparent on Wayland compositors"
@ -101,10 +102,10 @@ In order to have this config work on both my desktop with regular joe-schmoe mon
(if (daemonp) (if (daemonp)
(add-hook 'after-make-frame-functions (add-hook 'after-make-frame-functions
(lambda (frame) (lambda (frame)
(with-selected-frame frame (with-selected-frame frame
(chris/set-font-faces) (chris/set-font-faces)
(chris/set-transparency))) (chris/set-transparency)))
(chris/set-font-faces)) (chris/set-font-faces))
(chris/set-transparency)) (chris/set-transparency))
#+end_src #+end_src
@ -183,6 +184,12 @@ To use straight we need to bootstrap it. This code is pulled right from Straight
(setq use-package-verbose t) (setq use-package-verbose t)
#+end_src #+end_src
Now let's make sure our package archives includes the newer org.
#+begin_src emacs-lisp :tangle no
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
#+end_src
Command-log-mode
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package command-log-mode (use-package command-log-mode
:commands command-log-mode) :commands command-log-mode)
@ -204,9 +211,9 @@ Probably the prettiest and best modeline I've found.
all-the-icons-scale-factor 0.9) all-the-icons-scale-factor 0.9)
(if (daemonp) (if (daemonp)
(add-hook 'after-make-frame-functions (add-hook 'after-make-frame-functions
(lambda (frame) (lambda (frame)
(with-selected-frame frame (with-selected-frame frame
(setq doom-modeline-icon t)))))) (setq doom-modeline-icon t))))))
#+end_src #+end_src
Again, doom is pretty and I have fallen in love with the snazzy theme and use it about anywhere I can. Again, doom is pretty and I have fallen in love with the snazzy theme and use it about anywhere I can.
@ -303,7 +310,7 @@ There are two major packages we need to get the functionality I desire. Evil and
evil-want-C-u-scroll t evil-want-C-u-scroll t
evil-respect-visual-line-mode t evil-respect-visual-line-mode t
evil-want-C-u-delete t evil-want-C-u-delete t
evil-undo-system 'undo-redo) evil-undo-system 'undo-redo)
:config :config
(evil-mode +1)) (evil-mode +1))
#+end_src #+end_src
@ -369,7 +376,7 @@ This evil-collection package includes a lot of other evil based things.
:init (evil-escape-mode +1) :init (evil-escape-mode +1)
:config :config
(setq evil-escape-key-sequence "fd" (setq evil-escape-key-sequence "fd"
evil-escape-delay 0.3)) evil-escape-delay 0.3))
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -441,7 +448,7 @@ Visual fill column does a lot of the same as olivetti, but works with visual lin
:after org :after org
:config :config
(setq visual-fill-column-width 100 (setq visual-fill-column-width 100
visual-fill-column-center-text t)) visual-fill-column-center-text t))
#+end_src #+end_src
*** TOC-ORG *** TOC-ORG
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -653,13 +660,13 @@ Ace link provides an avy like search for links. Upon using the keybindings prese
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq display-buffer-alist (setq display-buffer-alist
'(("\\*e?shell\\*" '(("\\*e?shell\\*"
(display-buffer-pop-up-frame)) (display-buffer-pop-up-frame))
("*helpful*" ("*helpful*"
(display-buffer-pop-up-frame)) (display-buffer-pop-up-frame))
("*elfeed-entry*" ("*elfeed-entry*"
(display-buffer-pop-up-frame)) (display-buffer-pop-up-frame))
("*Bongo-Elfeed Queue*" ("*Bongo-Elfeed Queue*"
(display-buffer-pop-up-frame)))) (display-buffer-pop-up-frame))))
#+end_src #+end_src
Since I like to make my window manager handle a lot of the window management, I will create a helper function for closing windows. Since I like to make my window manager handle a lot of the window management, I will create a helper function for closing windows.
@ -703,7 +710,7 @@ Friar is a fennel repl in the awesome repl. It allows you to interact with Aweso
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package friar (use-package friar
:straight (:host github :repo "warreq/friar" :branch "master" :straight (:host github :repo "warreq/friar" :branch "master"
:files (:defaults "*.lua" "*.fnl")) :files (:defaults "*.lua" "*.fnl"))
:after fennel-mode) :after fennel-mode)
#+end_src #+end_src
@ -867,7 +874,7 @@ Let's start by creating a self contained function of what I'd like started on ev
(display-line-numbers-mode -1) (display-line-numbers-mode -1)
(variable-pitch-mode +1) (variable-pitch-mode +1)
(setq visual-fill-column-width 100 (setq visual-fill-column-width 100
visual-fill-column-center-text t)) visual-fill-column-center-text t))
#+end_src #+end_src
This is the use-package definition with a lot of customization. Need to setup auto tangle and make sure I have some structure templates for org-mode. This is the use-package definition with a lot of customization. Need to setup auto tangle and make sure I have some structure templates for org-mode.
@ -875,20 +882,22 @@ This is the use-package definition with a lot of customization. Need to setup au
Part of this config includes some special capture templates for my work as a youth minister. I create lessons through both org-mode and org-roam capture templates. The first part comes from org-roam, then the next is org-mode. Part of this config includes some special capture templates for my work as a youth minister. I create lessons through both org-mode and org-roam capture templates. The first part comes from org-roam, then the next is org-mode.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package org (use-package org
:defer 1 :straight t
:config :config
(setq org-startup-indented t (setq org-startup-indented t
org-edit-src-content-indentation 0 org-edit-src-content-indentation 0
org-agenda-sticky t org-agenda-sticky t
org-fontify-quote-and-verse-blocks t) org-fontify-quote-and-verse-blocks t
org-src-preserve-indentation t
org-src-window-setup 'other-frame)
(add-hook 'org-mode-hook 'chris/org-mode-setup) (add-hook 'org-mode-hook 'chris/org-mode-setup)
(org-babel-do-load-languages 'org-babel-load-languages (org-babel-do-load-languages 'org-babel-load-languages
'((emacs-lisp . t) '((emacs-lisp . t)
(python . t) (python . t)
(ditaa . t) (ditaa . t)
(shell . t))) (shell . t)))
(setq org-ditaa-jar-path "/usr/bin/ditaa") (setq org-ditaa-jar-path "/usr/bin/ditaa")
@ -901,81 +910,65 @@ Part of this config includes some special capture templates for my work as a you
(add-to-list 'org-structure-template-alist '("q" . "quote")) (add-to-list 'org-structure-template-alist '("q" . "quote"))
(setq org-capture-templates (setq org-capture-templates
'(("t" "Personal todo" entry '(("t" "Personal todo" entry
(file+headline "todo.org" "Inbox") (file+headline "todo.org" "Inbox")
(file ".templates/tasks.org") :prepend t) (file ".templates/tasks.org") :prepend t)
("n" "Personal notes" entry ("n" "Personal notes" entry
(file+headline "notes.org" "Inbox") (file+headline "notes.org" "Inbox")
"* %u %?\n%i\n%a" :prepend t) "* %u %?\n%i\n%a" :prepend t)
("j" "Journal" entry ("j" "Journal" entry
(file+olp+datetree +org-capture-journal-file) (file+olp+datetree +org-capture-journal-file)
"* %U %?\n%i\n%a" :prepend t) "* %U %?\n%i\n%a" :prepend t)
("p" "TFC Plan" entry ("p" "TFC Plan" entry
(function chris/org-roam-capture-lesson-file) (function chris/org-roam-capture-lesson-file)
(file ".templates/tfcplantemplate.org") (file ".templates/tfcplantemplate.org")
:prepend nil :prepend nil
:jump-to-captured t :jump-to-captured t
:empty-lines 1) :empty-lines 1)
("P" "TFC Posts" entry ("P" "TFC Posts" entry
(file+headline "/home/chris/org/nvtfc_social_media.org" "Posts") (file+headline "/home/chris/org/nvtfc_social_media.org" "Posts")
(file ".templates/posts.org") (file ".templates/posts.org")
:prepend t :prepend t
:jump-to-captured t) :jump-to-captured t)
("r" "Templates for projects") ("r" "Templates for projects")
("rt" "Project-local todo" entry ("rt" "Project-local todo" entry
(file+headline +org-capture-project-todo-file "Inbox") (file+headline +org-capture-project-todo-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t) "* TODO %?\n%i\n%a" :prepend t)
("rn" "Project-local notes" entry ("rn" "Project-local notes" entry
(file+headline +org-capture-project-notes-file "Inbox") (file+headline +org-capture-project-notes-file "Inbox")
"* %U %?\n%i\n%a" :prepend t) "* %U %?\n%i\n%a" :prepend t)
("rc" "Project-local changelog" entry ("rc" "Project-local changelog" entry
(file+headline +org-capture-project-changelog-file "Unreleased") (file+headline +org-capture-project-changelog-file "Unreleased")
"* %U %?\n%i\n%a" :prepend t) "* %U %?\n%i\n%a" :prepend t)
("o" "Centralized templates for projects") ("o" "Centralized templates for projects")
("ot" "Project todo" entry #'+org-capture-central-project-todo-file ("ot" "Project todo" entry #'+org-capture-central-project-todo-file
"* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil) "* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil)
("on" "Project notes" entry #'+org-capture-central-project-notes-file ("on" "Project notes" entry #'+org-capture-central-project-notes-file
"* %U %?\n %i\n %a" :heading "Notes" :prepend t) "* %U %?\n %i\n %a" :heading "Notes" :prepend t)
("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file ("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file
"* %U %?\n %i\n %a" :heading "Changelog" :prepend t)) "* %U %?\n %i\n %a" :heading "Changelog" :prepend t))
org-capture-use-agenda-date t org-capture-use-agenda-date t
org-agenda-timegrid-use-ampm t) org-agenda-timegrid-use-ampm t)
;;(setq org-superstar-headline-bullets-list '("◉" "◈" "▸" "✬" "◎" "◇" "❉" "✙" "❖")) (setq org-imenu-depth 4
(setq org-imenu-depth 4) org-odt-styles-file "/home/chris/org/style.odt"
(setq org-odt-styles-file "/home/chris/org/style.odt") org-export-with-toc nil
org-export-with-author nil
(setq org-export-with-toc nil) org-todo-keywords
(setq org-export-with-author nil) '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)")
(sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))
(setq org-todo-keywords org-agenda-files
'((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)") '("/home/chris/org/inbox.org"
(sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))) "/home/chris/org/notes.org"
"/home/chris/org/repetition.org"
"/home/chris/org/tasks.org"
(setq org-agenda-files "/home/chris/org/tfc_plans.org"
'("/home/chris/org/inbox.org" "/home/chris/org/ministry_team.org"
"/home/chris/org/notes.org" "/home/chris/org/todo.org"
"/home/chris/org/repetition.org" "/home/chris/org/newsletter.org"
"/home/chris/org/tasks.org" "/home/chris/org/nvtfc_social_media.org"
"/home/chris/org/tfc_plans.org" "/home/chris/org/lessons/")
"/home/chris/org/ministry_team.org" org-id-method 'ts)
"/home/chris/org/todo.org"
"/home/chris/org/newsletter.org"
"/home/chris/org/nvtfc_social_media.org"
"/home/chris/org/lessons/"))
;; (add-to-list '("/home/chris/org/inbox.org"
;; "/home/chris/org/notes.org"
;; "/home/chris/org/repetition.org"
;; "/home/chris/org/tasks.org"
;; "/home/chris/org/tfc_plans.org"
;; "/home/chris/org/ministry_team.org"
;; "/home/chris/org/todo.org"
;; "/home/chris/org/newsletter.org"
;; "/home/chris/org/lesson_*.org")
;; (expand-file-name ))
(setq org-id-method 'ts)
(defun chris/org-columns-view () (defun chris/org-columns-view ()
"Turn on org-columns overlay and turn off olivetti-mode" "Turn on org-columns overlay and turn off olivetti-mode"
@ -995,16 +988,16 @@ Part of this config includes some special capture templates for my work as a you
;;Let's make sure org-mode faces are inheriting fixed pitch faces. ;;Let's make sure org-mode faces are inheriting fixed pitch faces.
(dolist (face '(org-block (dolist (face '(org-block
org-block-begin-line org-block-begin-line
org-block-end-line org-block-end-line
org-code org-code
org-document-info-keyword org-document-info-keyword
org-meta-line org-meta-line
org-table org-table
org-date org-date
org-verbatim)) org-verbatim))
(set-face-attribute `,face nil :inherit 'fixed-pitch)) (set-face-attribute `,face nil :inherit 'fixed-pitch))
(set-face-attribute 'org-block-end-line nil :inherit 'org-block-begin-line) (set-face-attribute 'org-block-end-line nil :inherit 'org-block-begin-line)
(set-face-attribute 'org-quote nil :background "#242631" :inherit 'fixed-pitch) (set-face-attribute 'org-quote nil :background "#242631" :inherit 'fixed-pitch)
@ -1021,18 +1014,21 @@ Part of this config includes some special capture templates for my work as a you
"rr" 'org-refile "rr" 'org-refile
"e" 'org-export-dispatch) "e" 'org-export-dispatch)
('normal org-agenda-mode-map ('normal org-agenda-mode-map
"q" 'org-agenda-quit "q" 'org-agenda-quit
"r" 'org-agenda-redo "r" 'org-agenda-redo
"d" 'org-agenda-deadline "d" 'org-agenda-deadline
"s" 'org-agenda-schedule "s" 'org-agenda-schedule
"t" 'org-agenda-todo) "t" 'org-agenda-todo)
('normal org-columns-map ('normal org-columns-map
"j" 'outline-next-heading "j" 'outline-next-heading
"h" 'outline-previous-heading "h" 'outline-previous-heading
"q" 'chris/org-columns-quit) "q" 'chris/org-columns-quit)
('normal org-mode-map ('normal org-mode-map
"RET" 'chris/org-dwim-at-point "RET" 'chris/org-dwim-at-point
"gC" 'chris/org-columns-view)) "gC" 'chris/org-columns-view
"ge" 'org-edit-src-code)
('normal 'org-src-mode-map
"q" 'org-edit-src-abort))
#+end_src #+end_src
We need to create a lesson capture function to find our lesson files differently each time we run our TFC plan capture. This is the most unique part of my capture template. This function uses =org-roam-find-file= to pick the lesson file that I need to add my lesson plan to. This way the lesson itself is created before the plan. We need to create a lesson capture function to find our lesson files differently each time we run our TFC plan capture. This is the most unique part of my capture template. This function uses =org-roam-find-file= to pick the lesson file that I need to add my lesson plan to. This way the lesson itself is created before the plan.
@ -1102,13 +1098,17 @@ We also need to setup some capture templates to use some specific setups with my
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package org-roam (use-package org-roam
:after org :after org
;; :ensure t
:commands (org-roam org-roam-find-file org-roam-insert) :commands (org-roam org-roam-find-file org-roam-insert)
:hook
(org-load . org-roam-mode)
:config :config
(setq org-roam-directory "~/org") (setq org-roam-directory "~/org"
(setq org-roam-buffer-width 0.25) org-roam-buffer-width 0.25
(setq org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*") org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*"
(setq org-roam-db-location "~/.dotemacs/org-roam.db") org-roam-db-location "~/.dotemacs/org-roam.db"
(setq org-roam-capture-templates org-roam-completion-everywhere t
org-roam-capture-templates
'(("d" "default" plain (function org-roam--capture-get-point) '(("d" "default" plain (function org-roam--capture-get-point)
"%?" "%?"
:file-name "${slug}" :file-name "${slug}"
@ -1120,9 +1120,9 @@ We also need to setup some capture templates to use some specific setups with my
("l" "TFC Lesson" plain (function org-roam--capture-get-point) ("l" "TFC Lesson" plain (function org-roam--capture-get-point)
(file ".templates/lessontemplate.org") (file ".templates/lessontemplate.org")
:file-name "lessons/${slug}" :file-name "lessons/${slug}"
:head "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n"))) :head "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n"))
(setq org-roam-dailies-capture-templates org-roam-dailies-capture-templates
'(("d" "daily" plain #'org-roam-capture--get-point "" '(("d" "daily" plain #'org-roam-capture--get-point ""
:immediate-finish t :immediate-finish t
:file-name "%<%Y-%m-%d>" :file-name "%<%Y-%m-%d>"
@ -1135,9 +1135,9 @@ We also need to setup some capture templates to use some specific setups with my
(chris/leader-keys (chris/leader-keys
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
"nf" '(org-roam-find-file :which-key "org roam ff") "nf" '(org-roam-find-file :which-key "org roam ff")
"nr" 'org-roam "nr" 'org-roam
"ni" 'org-roam-insert)) "ni" 'org-roam-insert))
#+END_SRC #+END_SRC
@ -1168,8 +1168,8 @@ Org-Superstar makes the stars at the beginning of the line in =org-mode= a lot p
(org-superstar-mode +1) (org-superstar-mode +1)
(setq org-superstar-headline-bullets-list '("\u25c9" "\u25c8" "盛" "\u25ce" "\u272c" "\u25c7" "\u2749" "\u2719" "\u2756")) (setq org-superstar-headline-bullets-list '("\u25c9" "\u25c8" "盛" "\u25ce" "\u272c" "\u25c7" "\u2749" "\u2719" "\u2756"))
(setq org-superstar-item-bullet-alist '((?- . ?\u25b8) (setq org-superstar-item-bullet-alist '((?- . ?\u25b8)
(?+ . ?\u2749) (?+ . ?\u2749)
(?* . ?\u25c9))) (?* . ?\u25c9)))
(set-face-attribute 'org-superstar-item nil :inherit 'org-level-3) (set-face-attribute 'org-superstar-item nil :inherit 'org-level-3)
(add-hook 'org-mode-hook 'org-superstar-mode)) (add-hook 'org-mode-hook 'org-superstar-mode))
#+end_src #+end_src
@ -1346,88 +1346,88 @@ If on a:
:config :config
(setq mail-user-agent 'mu4e-user-agent) (setq mail-user-agent 'mu4e-user-agent)
(setq mu4e-maildir "~/Maildir" (setq mu4e-maildir "~/Maildir"
user-full-name "Chris Cochrun" user-full-name "Chris Cochrun"
mu4e-change-filenames-when-moving t mu4e-change-filenames-when-moving t
mu4e-get-mail-command "mbsync -a" mu4e-get-mail-command "mbsync -a"
mu4e-update-interval (* 15 60) mu4e-update-interval (* 15 60)
mu4e-attachment-dir "/home/chris/Documents/PersonalImportant/attachments" mu4e-attachment-dir "/home/chris/Documents/PersonalImportant/attachments"
mu4e-completing-read-function #'completing-read) mu4e-completing-read-function #'completing-read)
(setq mu4e-contexts (setq mu4e-contexts
(list (list
(make-mu4e-context (make-mu4e-context
:name "office" :name "office"
:match-func :match-func
(lambda (msg) (lambda (msg)
(when msg (when msg
(string-prefix-p "/office" (mu4e-message-field msg :maildir)))) (string-prefix-p "/office" (mu4e-message-field msg :maildir))))
:vars '((user-mail-address . "chris@tfcconnection.org") :vars '((user-mail-address . "chris@tfcconnection.org")
(mu4e-sent-folder . "/office/Sent Items/") (mu4e-sent-folder . "/office/Sent Items/")
(mu4e-drafts-folder . "/office/Drafts") (mu4e-drafts-folder . "/office/Drafts")
(mu4e-trash-folder . "/office/Deleted Items") (mu4e-trash-folder . "/office/Deleted Items")
(mu4e-refile-folder . "/office/Archive") (mu4e-refile-folder . "/office/Archive")
(smtpmail-smtp-user . "chris@tfcconnection.org") (smtpmail-smtp-user . "chris@tfcconnection.org")
(mu4e-compose-signature . "---\nChris Cochrun"))) (mu4e-compose-signature . "---\nChris Cochrun")))
(make-mu4e-context (make-mu4e-context
:name "outlook" :name "outlook"
:match-func :match-func
(lambda (msg) (lambda (msg)
(when msg (when msg
(string-prefix-p "/outlook" (mu4e-message-field msg :maildir)))) (string-prefix-p "/outlook" (mu4e-message-field msg :maildir))))
:vars '((user-mail-address . "chris.cochrun@outlook.com") :vars '((user-mail-address . "chris.cochrun@outlook.com")
(mu4e-sent-folder . "/outlook/Sent/") (mu4e-sent-folder . "/outlook/Sent/")
(mu4e-drafts-folder . "/outlook/Drafts") (mu4e-drafts-folder . "/outlook/Drafts")
(mu4e-trash-folder . "/outlook/Deleted") (mu4e-trash-folder . "/outlook/Deleted")
(mu4e-refile-folder . "/outlook/Archive") (mu4e-refile-folder . "/outlook/Archive")
(smtpmail-smtp-user . "chris.cochrun@outlook.com") (smtpmail-smtp-user . "chris.cochrun@outlook.com")
(mu4e-compose-signature . "---\nChris Cochrun"))) (mu4e-compose-signature . "---\nChris Cochrun")))
(make-mu4e-context (make-mu4e-context
:name "gmail" :name "gmail"
:match-func :match-func
(lambda (msg) (lambda (msg)
(when msg (when msg
(string-prefix-p "/gmail" (mu4e-message-field msg :maildir)))) (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
:vars '((user-mail-address . "ccochrun21@gmail.com") :vars '((user-mail-address . "ccochrun21@gmail.com")
(mu4e-sent-folder . "/gmail/[Gmail].Sent Mail/") (mu4e-sent-folder . "/gmail/[Gmail].Sent Mail/")
(smtpmail-smtp-user . "ccochrun21@gmail.com") (smtpmail-smtp-user . "ccochrun21@gmail.com")
(mu4e-compose-signature . "---\nChris Cochrun"))))) (mu4e-compose-signature . "---\nChris Cochrun")))))
;; Add the ability to send email for o365 ;; Add the ability to send email for o365
(setq message-send-mail-function 'smtpmail-send-it (setq message-send-mail-function 'smtpmail-send-it
starttls-use-gnutls t starttls-use-gnutls t
smtpmail-starttls-credentials '(("smtp.office365.com" 587 nil nil)) smtpmail-starttls-credentials '(("smtp.office365.com" 587 nil nil))
smtpmail-auth-credentials smtpmail-auth-credentials
'(("smtp.office365.com" 587 "chris@tfcconnection.org" nil)) '(("smtp.office365.com" 587 "chris@tfcconnection.org" nil))
smtpmail-default-smtp-server "smtp.office365.com" smtpmail-default-smtp-server "smtp.office365.com"
smtpmail-smtp-server "smtp.office365.com" smtpmail-smtp-server "smtp.office365.com"
smtpmail-smtp-service 587) smtpmail-smtp-service 587)
;; shortcuts in the jumplist by pressing "J" in the mu4e buffer ;; shortcuts in the jumplist by pressing "J" in the mu4e buffer
(setq mu4e-maildir-shortcuts (setq mu4e-maildir-shortcuts
'((:maildir "/office/Archive" :key ?a) '((:maildir "/office/Archive" :key ?a)
(:maildir "/office/INBOX" :key ?i) (:maildir "/office/INBOX" :key ?i)
(:maildir "/outlook/INBOX" :key ?l) (:maildir "/outlook/INBOX" :key ?l)
(:maildir "/office/Junk Email" :key ?j) (:maildir "/office/Junk Email" :key ?j)
(:maildir "/office/INBOX/Website Forms" :key ?f) (:maildir "/office/INBOX/Website Forms" :key ?f)
(:maildir "/gmail/INBOX" :key ?g) (:maildir "/gmail/INBOX" :key ?g)
(:maildir "/office/Sent Items" :key ?s))) (:maildir "/office/Sent Items" :key ?s)))
;; (add-to-list mu4e-headers-actions ("org capture message" . mu4e-org-store-and-capture)) ;; (add-to-list mu4e-headers-actions ("org capture message" . mu4e-org-store-and-capture))
(setq mu4e-bookmarks (setq mu4e-bookmarks
'((:name "Unread messages" '((:name "Unread messages"
:query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\"" :query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\""
:key 117) :key 117)
(:name "Today's messages" (:name "Today's messages"
:query "date:today..now" :query "date:today..now"
:key 116) :key 116)
(:name "Last 7 days" (:name "Last 7 days"
:query "date:7d..now" :query "date:7d..now"
:hide-unread t :hide-unread t
:key 119) :key 119)
(:name "Messages with images" (:name "Messages with images"
:query "mime:image/*" :query "mime:image/*"
:key 112))) :key 112)))
(setq mu4e-mu-binary "/usr/bin/mu") (setq mu4e-mu-binary "/usr/bin/mu")
(setq mu4e-use-fancy-chars t (setq mu4e-use-fancy-chars t
@ -1444,15 +1444,15 @@ If on a:
mu4e-headers-unread-mark '("u" . " ")) mu4e-headers-unread-mark '("u" . " "))
(setq mu4e-headers-fields (setq mu4e-headers-fields
'((:human-date . 12) '((:human-date . 12)
(:flags . 6) (:flags . 6)
(:from . 22) (:from . 22)
(:subject))) (:subject)))
(setq mu4e-view-actions (setq mu4e-view-actions
'(("capture message" . mu4e-action-capture-message) '(("capture message" . mu4e-action-capture-message)
("view in browser" . mu4e-action-view-in-browser) ("view in browser" . mu4e-action-view-in-browser)
("show this thread" . mu4e-action-show-thread))) ("show this thread" . mu4e-action-show-thread)))
(defun chris/setup-mu4e-headers () (defun chris/setup-mu4e-headers ()
(toggle-truncate-lines +1) (toggle-truncate-lines +1)
@ -1620,9 +1620,9 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
(unless pop-eshell (unless pop-eshell
(setq pop-eshell (eshell 100)) (setq pop-eshell (eshell 100))
(with-current-buffer pop-eshell (with-current-buffer pop-eshell
(eshell/clear-scrollback) (eshell/clear-scrollback)
(rename-buffer "*eshell-pop*") (rename-buffer "*eshell-pop*")
(display-buffer-in-side-window pop-eshell '((side . bottom)))))) (display-buffer-in-side-window pop-eshell '((side . bottom))))))
(setq eshell-banner-message "") (setq eshell-banner-message "")
@ -1665,8 +1665,8 @@ Let's use pdf-tools for a lot better interaction with pdfs.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package pdf-tools (use-package pdf-tools
:straight (:host github :straight (:host github
:repo "flatwhatson/pdf-tools" :repo "flatwhatson/pdf-tools"
:branch "fix-macros") :branch "fix-macros")
:defer 1 :defer 1
:config :config
(pdf-tools-install)) (pdf-tools-install))
@ -1699,33 +1699,33 @@ interfere with the default `bongo-playlist-buffer'."
(enclosure (elt (car (elfeed-entry-enclosures entry)) 0)) (enclosure (elt (car (elfeed-entry-enclosures entry)) 0))
(url (if (string-prefix-p "https://thumbnails" enclosure) (url (if (string-prefix-p "https://thumbnails" enclosure)
link link
enclosure)) enclosure))
(title (elfeed-entry-title entry)) (title (elfeed-entry-title entry))
(bongo-pl chris/elfeed-bongo-playlist) (bongo-pl chris/elfeed-bongo-playlist)
(buffer (get-buffer-create bongo-pl))) (buffer (get-buffer-create bongo-pl)))
(message "link is %s" link) (message "link is %s" link)
(message "enclosure is %s" enclosure) (message "enclosure is %s" enclosure)
(message "url is %s" url) (message "url is %s" url)
(message "title is %s" title) (message "title is %s" title)
(elfeed-search-untag-all-unread) (elfeed-search-untag-all-unread)
(unless (bongo-playlist-buffer) (unless (bongo-playlist-buffer)
(bongo-playlist-buffer)) (bongo-playlist-buffer))
(display-buffer buffer) (display-buffer buffer)
(with-current-buffer buffer (with-current-buffer buffer
(when (not (bongo-playlist-buffer-p)) (when (not (bongo-playlist-buffer-p))
(bongo-playlist-mode) (bongo-playlist-mode)
(setq-local bongo-library-buffer (get-buffer "*elfeed-search*")) (setq-local bongo-library-buffer (get-buffer "*elfeed-search*"))
(setq-local bongo-enabled-backends '(mpv)) (setq-local bongo-enabled-backends '(mpv))
(bongo-progressive-playback-mode)) (bongo-progressive-playback-mode))
(goto-char (point-max)) (goto-char (point-max))
(bongo-insert-uri url (format "%s ==> %s" title url)) (bongo-insert-uri url (format "%s ==> %s" title url))
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(delete-duplicate-lines (point-min) (point-max))) (delete-duplicate-lines (point-min) (point-max)))
(bongo-recenter)) (bongo-recenter))
(message "Enqueued %s “%s” in %s" (message "Enqueued %s “%s” in %s"
(if enclosure "podcast" "video") (if enclosure "podcast" "video")
(propertize title 'face 'italic) (propertize title 'face 'italic)
(propertize bongo-pl 'face 'bold)))) (propertize bongo-pl 'face 'bold))))
(defun chris/elfeed-bongo-switch-to-playlist () (defun chris/elfeed-bongo-switch-to-playlist ()
(interactive) (interactive)
@ -1733,7 +1733,7 @@ interfere with the default `bongo-playlist-buffer'."
(buffer (get-buffer bongo-pl))) (buffer (get-buffer bongo-pl)))
(if buffer (if buffer
(switch-to-buffer buffer) (switch-to-buffer buffer)
(message "No `bongo' playlist is associated with `elfeed'.")))) (message "No `bongo' playlist is associated with `elfeed'."))))
:general :general
@ -1768,14 +1768,14 @@ interfere with the default `bongo-playlist-buffer'."
:matcher '((local-file "file:" "http:" "ftp:" "lbry:") :matcher '((local-file "file:" "http:" "ftp:" "lbry:")
"ogg" "flac" "mp3" "mka" "wav" "wma" "ogg" "flac" "mp3" "mka" "wav" "wma"
"mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4" "mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4"
"mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts") "mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts")
:matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:" :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:"
"dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:" "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:"
"cue:" "sdp:" "mpst:" "tivo:") . t) "cue:" "sdp:" "mpst:" "tivo:") . t)
:matcher '(("http:" "https:" "lbry:") . t)) :matcher '(("http:" "https:" "lbry:") . t))
(setq bongo-enabled-backends '(mpv) (setq bongo-enabled-backends '(mpv)
bongo-track-mark-icon-file-name "track-mark-icon.png") bongo-track-mark-icon-file-name "track-mark-icon.png")
(defun chris/bongo-mark-line-forward () (defun chris/bongo-mark-line-forward ()
(interactive) (interactive)
@ -1810,17 +1810,17 @@ I use transmission on a server to manage my torrents
(if (string-equal (system-name) "syl") (if (string-equal (system-name) "syl")
(setq transmission-host "home.cochrun.xyz" (setq transmission-host "home.cochrun.xyz"
transmission-rpc-path "/transmission/rpc" transmission-rpc-path "/transmission/rpc"
transmission-refresh-modes '(transmission-mode transmission-refresh-modes '(transmission-mode
transmission-files-mode transmission-files-mode
transmission-info-mode transmission-info-mode
transmission-peers-mode)) transmission-peers-mode))
(setq transmission-host "192.168.1.2" (setq transmission-host "192.168.1.2"
transmission-rpc-path "/transmission/rpc" transmission-rpc-path "/transmission/rpc"
transmission-refresh-modes '(transmission-mode transmission-refresh-modes '(transmission-mode
transmission-files-mode transmission-files-mode
transmission-info-mode transmission-info-mode
transmission-peers-mode))) transmission-peers-mode)))
:general :general
(chris/leader-keys (chris/leader-keys
:states 'normal :states 'normal
@ -1910,8 +1910,8 @@ Let's also use an automatic garbage collector while idle to make better input.
(gcmh-mode) (gcmh-mode)
:config :config
(setq gcmh-idle-delay 5 (setq gcmh-idle-delay 5
gcmh-high-cons-threshold (* 128 1024 1024) ; 128mb gcmh-high-cons-threshold (* 128 1024 1024) ; 128mb
gcmh-verbose t)) gcmh-verbose t))
#+end_src #+end_src
** Logging ** Logging

484
init.el
View file

@ -17,6 +17,7 @@
(menu-bar-mode -1) (menu-bar-mode -1)
(blink-cursor-mode -1) (blink-cursor-mode -1)
(column-number-mode +1) (column-number-mode +1)
(setq-default indent-tabs-mode nil)
(if (string-equal (system-name) "syl") (if (string-equal (system-name) "syl")
(defvar chris/default-font-size 240) (defvar chris/default-font-size 240)
@ -31,7 +32,7 @@
:height chris/default-font-size) :height chris/default-font-size)
(set-face-attribute 'variable-pitch nil :font "Cantarell" (set-face-attribute 'variable-pitch nil :font "Cantarell"
:height (+ chris/default-font-size (/ chris/default-font-size 8)) :height (+ chris/default-font-size (/ chris/default-font-size 8))
:weight 'regular)) :weight 'regular))
(defun chris/set-transparency () (defun chris/set-transparency ()
"Set the frame to be transparent on Wayland compositors" "Set the frame to be transparent on Wayland compositors"
@ -41,10 +42,10 @@
(if (daemonp) (if (daemonp)
(add-hook 'after-make-frame-functions (add-hook 'after-make-frame-functions
(lambda (frame) (lambda (frame)
(with-selected-frame frame (with-selected-frame frame
(chris/set-font-faces) (chris/set-font-faces)
(chris/set-transparency))) (chris/set-transparency)))
(chris/set-font-faces)) (chris/set-font-faces))
(chris/set-transparency)) (chris/set-transparency))
@ -96,8 +97,8 @@
(straight-use-package 'use-package) (straight-use-package 'use-package)
(setq use-package-verbose t) (setq use-package-verbose t)
(use-package command-log-mode (use-package command-log-mode
:commands command-log-mode) :commands command-log-mode)
(use-package all-the-icons) (use-package all-the-icons)
@ -110,9 +111,9 @@
all-the-icons-scale-factor 0.9) all-the-icons-scale-factor 0.9)
(if (daemonp) (if (daemonp)
(add-hook 'after-make-frame-functions (add-hook 'after-make-frame-functions
(lambda (frame) (lambda (frame)
(with-selected-frame frame (with-selected-frame frame
(setq doom-modeline-icon t)))))) (setq doom-modeline-icon t))))))
(use-package doom-themes (use-package doom-themes
:ensure t :ensure t
@ -182,7 +183,7 @@
evil-want-C-u-scroll t evil-want-C-u-scroll t
evil-respect-visual-line-mode t evil-respect-visual-line-mode t
evil-want-C-u-delete t evil-want-C-u-delete t
evil-undo-system 'undo-redo) evil-undo-system 'undo-redo)
:config :config
(evil-mode +1)) (evil-mode +1))
@ -241,7 +242,7 @@
:init (evil-escape-mode +1) :init (evil-escape-mode +1)
:config :config
(setq evil-escape-key-sequence "fd" (setq evil-escape-key-sequence "fd"
evil-escape-delay 0.3)) evil-escape-delay 0.3))
(use-package evil-surround (use-package evil-surround
:after evil :after evil
@ -268,7 +269,7 @@
:after org :after org
:config :config
(setq visual-fill-column-width 100 (setq visual-fill-column-width 100
visual-fill-column-center-text t)) visual-fill-column-center-text t))
(use-package toc-org (use-package toc-org
:after org) :after org)
@ -374,13 +375,13 @@ vertically."
(setq display-buffer-alist (setq display-buffer-alist
'(("\\*e?shell\\*" '(("\\*e?shell\\*"
(display-buffer-pop-up-frame)) (display-buffer-pop-up-frame))
("*helpful*" ("*helpful*"
(display-buffer-pop-up-frame)) (display-buffer-pop-up-frame))
("*elfeed-entry*" ("*elfeed-entry*"
(display-buffer-pop-up-frame)) (display-buffer-pop-up-frame))
("*Bongo-Elfeed Queue*" ("*Bongo-Elfeed Queue*"
(display-buffer-pop-up-frame)))) (display-buffer-pop-up-frame))))
(defun chris/kill-buffer-frame () (defun chris/kill-buffer-frame ()
"Kills the active buffer and frame" "Kills the active buffer and frame"
@ -405,7 +406,7 @@ vertically."
(use-package friar (use-package friar
:straight (:host github :repo "warreq/friar" :branch "master" :straight (:host github :repo "warreq/friar" :branch "master"
:files (:defaults "*.lua" "*.fnl")) :files (:defaults "*.lua" "*.fnl"))
:after fennel-mode) :after fennel-mode)
(use-package yaml-mode (use-package yaml-mode
@ -519,23 +520,25 @@ vertically."
(display-line-numbers-mode -1) (display-line-numbers-mode -1)
(variable-pitch-mode +1) (variable-pitch-mode +1)
(setq visual-fill-column-width 100 (setq visual-fill-column-width 100
visual-fill-column-center-text t)) visual-fill-column-center-text t))
(use-package org (use-package org
:defer 1 :straight t
:config :config
(setq org-startup-indented t (setq org-startup-indented t
org-edit-src-content-indentation 0 org-edit-src-content-indentation 0
org-agenda-sticky t org-agenda-sticky t
org-fontify-quote-and-verse-blocks t) org-fontify-quote-and-verse-blocks t
org-src-preserve-indentation t
org-src-window-setup 'other-frame)
(add-hook 'org-mode-hook 'chris/org-mode-setup) (add-hook 'org-mode-hook 'chris/org-mode-setup)
(org-babel-do-load-languages 'org-babel-load-languages (org-babel-do-load-languages 'org-babel-load-languages
'((emacs-lisp . t) '((emacs-lisp . t)
(python . t) (python . t)
(ditaa . t) (ditaa . t)
(shell . t))) (shell . t)))
(setq org-ditaa-jar-path "/usr/bin/ditaa") (setq org-ditaa-jar-path "/usr/bin/ditaa")
@ -548,81 +551,65 @@ vertically."
(add-to-list 'org-structure-template-alist '("q" . "quote")) (add-to-list 'org-structure-template-alist '("q" . "quote"))
(setq org-capture-templates (setq org-capture-templates
'(("t" "Personal todo" entry '(("t" "Personal todo" entry
(file+headline "todo.org" "Inbox") (file+headline "todo.org" "Inbox")
(file ".templates/tasks.org") :prepend t) (file ".templates/tasks.org") :prepend t)
("n" "Personal notes" entry ("n" "Personal notes" entry
(file+headline "notes.org" "Inbox") (file+headline "notes.org" "Inbox")
"* %u %?\n%i\n%a" :prepend t) "* %u %?\n%i\n%a" :prepend t)
("j" "Journal" entry ("j" "Journal" entry
(file+olp+datetree +org-capture-journal-file) (file+olp+datetree +org-capture-journal-file)
"* %U %?\n%i\n%a" :prepend t) "* %U %?\n%i\n%a" :prepend t)
("p" "TFC Plan" entry ("p" "TFC Plan" entry
(function chris/org-roam-capture-lesson-file) (function chris/org-roam-capture-lesson-file)
(file ".templates/tfcplantemplate.org") (file ".templates/tfcplantemplate.org")
:prepend nil :prepend nil
:jump-to-captured t :jump-to-captured t
:empty-lines 1) :empty-lines 1)
("P" "TFC Posts" entry ("P" "TFC Posts" entry
(file+headline "/home/chris/org/nvtfc_social_media.org" "Posts") (file+headline "/home/chris/org/nvtfc_social_media.org" "Posts")
(file ".templates/posts.org") (file ".templates/posts.org")
:prepend t :prepend t
:jump-to-captured t) :jump-to-captured t)
("r" "Templates for projects") ("r" "Templates for projects")
("rt" "Project-local todo" entry ("rt" "Project-local todo" entry
(file+headline +org-capture-project-todo-file "Inbox") (file+headline +org-capture-project-todo-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t) "* TODO %?\n%i\n%a" :prepend t)
("rn" "Project-local notes" entry ("rn" "Project-local notes" entry
(file+headline +org-capture-project-notes-file "Inbox") (file+headline +org-capture-project-notes-file "Inbox")
"* %U %?\n%i\n%a" :prepend t) "* %U %?\n%i\n%a" :prepend t)
("rc" "Project-local changelog" entry ("rc" "Project-local changelog" entry
(file+headline +org-capture-project-changelog-file "Unreleased") (file+headline +org-capture-project-changelog-file "Unreleased")
"* %U %?\n%i\n%a" :prepend t) "* %U %?\n%i\n%a" :prepend t)
("o" "Centralized templates for projects") ("o" "Centralized templates for projects")
("ot" "Project todo" entry #'+org-capture-central-project-todo-file ("ot" "Project todo" entry #'+org-capture-central-project-todo-file
"* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil) "* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil)
("on" "Project notes" entry #'+org-capture-central-project-notes-file ("on" "Project notes" entry #'+org-capture-central-project-notes-file
"* %U %?\n %i\n %a" :heading "Notes" :prepend t) "* %U %?\n %i\n %a" :heading "Notes" :prepend t)
("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file ("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file
"* %U %?\n %i\n %a" :heading "Changelog" :prepend t)) "* %U %?\n %i\n %a" :heading "Changelog" :prepend t))
org-capture-use-agenda-date t org-capture-use-agenda-date t
org-agenda-timegrid-use-ampm t) org-agenda-timegrid-use-ampm t)
;;(setq org-superstar-headline-bullets-list '("◉" "◈" "▸" "✬" "◎" "◇" "❉" "✙" "❖")) (setq org-imenu-depth 4
(setq org-imenu-depth 4) org-odt-styles-file "/home/chris/org/style.odt"
(setq org-odt-styles-file "/home/chris/org/style.odt") org-export-with-toc nil
org-export-with-author nil
(setq org-export-with-toc nil) org-todo-keywords
(setq org-export-with-author nil) '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)")
(sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))
(setq org-todo-keywords org-agenda-files
'((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)") '("/home/chris/org/inbox.org"
(sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))) "/home/chris/org/notes.org"
"/home/chris/org/repetition.org"
"/home/chris/org/tasks.org"
(setq org-agenda-files "/home/chris/org/tfc_plans.org"
'("/home/chris/org/inbox.org" "/home/chris/org/ministry_team.org"
"/home/chris/org/notes.org" "/home/chris/org/todo.org"
"/home/chris/org/repetition.org" "/home/chris/org/newsletter.org"
"/home/chris/org/tasks.org" "/home/chris/org/nvtfc_social_media.org"
"/home/chris/org/tfc_plans.org" "/home/chris/org/lessons/")
"/home/chris/org/ministry_team.org" org-id-method 'ts)
"/home/chris/org/todo.org"
"/home/chris/org/newsletter.org"
"/home/chris/org/nvtfc_social_media.org"
"/home/chris/org/lessons/"))
;; (add-to-list '("/home/chris/org/inbox.org"
;; "/home/chris/org/notes.org"
;; "/home/chris/org/repetition.org"
;; "/home/chris/org/tasks.org"
;; "/home/chris/org/tfc_plans.org"
;; "/home/chris/org/ministry_team.org"
;; "/home/chris/org/todo.org"
;; "/home/chris/org/newsletter.org"
;; "/home/chris/org/lesson_*.org")
;; (expand-file-name ))
(setq org-id-method 'ts)
(defun chris/org-columns-view () (defun chris/org-columns-view ()
"Turn on org-columns overlay and turn off olivetti-mode" "Turn on org-columns overlay and turn off olivetti-mode"
@ -642,16 +629,16 @@ vertically."
;;Let's make sure org-mode faces are inheriting fixed pitch faces. ;;Let's make sure org-mode faces are inheriting fixed pitch faces.
(dolist (face '(org-block (dolist (face '(org-block
org-block-begin-line org-block-begin-line
org-block-end-line org-block-end-line
org-code org-code
org-document-info-keyword org-document-info-keyword
org-meta-line org-meta-line
org-table org-table
org-date org-date
org-verbatim)) org-verbatim))
(set-face-attribute `,face nil :inherit 'fixed-pitch)) (set-face-attribute `,face nil :inherit 'fixed-pitch))
(set-face-attribute 'org-block-end-line nil :inherit 'org-block-begin-line) (set-face-attribute 'org-block-end-line nil :inherit 'org-block-begin-line)
(set-face-attribute 'org-quote nil :background "#242631" :inherit 'fixed-pitch) (set-face-attribute 'org-quote nil :background "#242631" :inherit 'fixed-pitch)
@ -668,18 +655,21 @@ vertically."
"rr" 'org-refile "rr" 'org-refile
"e" 'org-export-dispatch) "e" 'org-export-dispatch)
('normal org-agenda-mode-map ('normal org-agenda-mode-map
"q" 'org-agenda-quit "q" 'org-agenda-quit
"r" 'org-agenda-redo "r" 'org-agenda-redo
"d" 'org-agenda-deadline "d" 'org-agenda-deadline
"s" 'org-agenda-schedule "s" 'org-agenda-schedule
"t" 'org-agenda-todo) "t" 'org-agenda-todo)
('normal org-columns-map ('normal org-columns-map
"j" 'outline-next-heading "j" 'outline-next-heading
"h" 'outline-previous-heading "h" 'outline-previous-heading
"q" 'chris/org-columns-quit) "q" 'chris/org-columns-quit)
('normal org-mode-map ('normal org-mode-map
"RET" 'chris/org-dwim-at-point "RET" 'chris/org-dwim-at-point
"gC" 'chris/org-columns-view)) "gC" 'chris/org-columns-view
"ge" 'org-edit-src-code)
('normal 'org-src-mode-map
"q" 'org-edit-src-abort))
(defun chris/org-roam-capture-lesson-file () (defun chris/org-roam-capture-lesson-file ()
"Function to return the lesson file that is needed for TFC plan capture and move to correct position for plan insertion" "Function to return the lesson file that is needed for TFC plan capture and move to correct position for plan insertion"
@ -726,13 +716,17 @@ vertically."
(use-package org-roam (use-package org-roam
:after org :after org
;; :ensure t
:commands (org-roam org-roam-find-file org-roam-insert) :commands (org-roam org-roam-find-file org-roam-insert)
:hook
(org-load . org-roam-mode)
:config :config
(setq org-roam-directory "~/org") (setq org-roam-directory "~/org"
(setq org-roam-buffer-width 0.25) org-roam-buffer-width 0.25
(setq org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*") org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*"
(setq org-roam-db-location "~/.dotemacs/org-roam.db") org-roam-db-location "~/.dotemacs/org-roam.db"
(setq org-roam-capture-templates org-roam-completion-everywhere t
org-roam-capture-templates
'(("d" "default" plain (function org-roam--capture-get-point) '(("d" "default" plain (function org-roam--capture-get-point)
"%?" "%?"
:file-name "${slug}" :file-name "${slug}"
@ -744,9 +738,9 @@ vertically."
("l" "TFC Lesson" plain (function org-roam--capture-get-point) ("l" "TFC Lesson" plain (function org-roam--capture-get-point)
(file ".templates/lessontemplate.org") (file ".templates/lessontemplate.org")
:file-name "lessons/${slug}" :file-name "lessons/${slug}"
:head "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n"))) :head "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n"))
(setq org-roam-dailies-capture-templates org-roam-dailies-capture-templates
'(("d" "daily" plain #'org-roam-capture--get-point "" '(("d" "daily" plain #'org-roam-capture--get-point ""
:immediate-finish t :immediate-finish t
:file-name "%<%Y-%m-%d>" :file-name "%<%Y-%m-%d>"
@ -759,9 +753,9 @@ vertically."
(chris/leader-keys (chris/leader-keys
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
"nf" '(org-roam-find-file :which-key "org roam ff") "nf" '(org-roam-find-file :which-key "org roam ff")
"nr" 'org-roam "nr" 'org-roam
"ni" 'org-roam-insert)) "ni" 'org-roam-insert))
(use-package org-roam-server (use-package org-roam-server
:config :config
@ -783,8 +777,8 @@ vertically."
(org-superstar-mode +1) (org-superstar-mode +1)
(setq org-superstar-headline-bullets-list '("\u25c9" "\u25c8" "" "\u25ce" "\u272c" "\u25c7" "\u2749" "\u2719" "\u2756")) (setq org-superstar-headline-bullets-list '("\u25c9" "\u25c8" "" "\u25ce" "\u272c" "\u25c7" "\u2749" "\u2719" "\u2756"))
(setq org-superstar-item-bullet-alist '((?- . ?\u25b8) (setq org-superstar-item-bullet-alist '((?- . ?\u25b8)
(?+ . ?\u2749) (?+ . ?\u2749)
(?* . ?\u25c9))) (?* . ?\u25c9)))
(set-face-attribute 'org-superstar-item nil :inherit 'org-level-3) (set-face-attribute 'org-superstar-item nil :inherit 'org-level-3)
(add-hook 'org-mode-hook 'org-superstar-mode)) (add-hook 'org-mode-hook 'org-superstar-mode))
@ -956,88 +950,88 @@ If on a:
:config :config
(setq mail-user-agent 'mu4e-user-agent) (setq mail-user-agent 'mu4e-user-agent)
(setq mu4e-maildir "~/Maildir" (setq mu4e-maildir "~/Maildir"
user-full-name "Chris Cochrun" user-full-name "Chris Cochrun"
mu4e-change-filenames-when-moving t mu4e-change-filenames-when-moving t
mu4e-get-mail-command "mbsync -a" mu4e-get-mail-command "mbsync -a"
mu4e-update-interval (* 15 60) mu4e-update-interval (* 15 60)
mu4e-attachment-dir "/home/chris/Documents/PersonalImportant/attachments" mu4e-attachment-dir "/home/chris/Documents/PersonalImportant/attachments"
mu4e-completing-read-function #'completing-read) mu4e-completing-read-function #'completing-read)
(setq mu4e-contexts (setq mu4e-contexts
(list (list
(make-mu4e-context (make-mu4e-context
:name "office" :name "office"
:match-func :match-func
(lambda (msg) (lambda (msg)
(when msg (when msg
(string-prefix-p "/office" (mu4e-message-field msg :maildir)))) (string-prefix-p "/office" (mu4e-message-field msg :maildir))))
:vars '((user-mail-address . "chris@tfcconnection.org") :vars '((user-mail-address . "chris@tfcconnection.org")
(mu4e-sent-folder . "/office/Sent Items/") (mu4e-sent-folder . "/office/Sent Items/")
(mu4e-drafts-folder . "/office/Drafts") (mu4e-drafts-folder . "/office/Drafts")
(mu4e-trash-folder . "/office/Deleted Items") (mu4e-trash-folder . "/office/Deleted Items")
(mu4e-refile-folder . "/office/Archive") (mu4e-refile-folder . "/office/Archive")
(smtpmail-smtp-user . "chris@tfcconnection.org") (smtpmail-smtp-user . "chris@tfcconnection.org")
(mu4e-compose-signature . "---\nChris Cochrun"))) (mu4e-compose-signature . "---\nChris Cochrun")))
(make-mu4e-context (make-mu4e-context
:name "outlook" :name "outlook"
:match-func :match-func
(lambda (msg) (lambda (msg)
(when msg (when msg
(string-prefix-p "/outlook" (mu4e-message-field msg :maildir)))) (string-prefix-p "/outlook" (mu4e-message-field msg :maildir))))
:vars '((user-mail-address . "chris.cochrun@outlook.com") :vars '((user-mail-address . "chris.cochrun@outlook.com")
(mu4e-sent-folder . "/outlook/Sent/") (mu4e-sent-folder . "/outlook/Sent/")
(mu4e-drafts-folder . "/outlook/Drafts") (mu4e-drafts-folder . "/outlook/Drafts")
(mu4e-trash-folder . "/outlook/Deleted") (mu4e-trash-folder . "/outlook/Deleted")
(mu4e-refile-folder . "/outlook/Archive") (mu4e-refile-folder . "/outlook/Archive")
(smtpmail-smtp-user . "chris.cochrun@outlook.com") (smtpmail-smtp-user . "chris.cochrun@outlook.com")
(mu4e-compose-signature . "---\nChris Cochrun"))) (mu4e-compose-signature . "---\nChris Cochrun")))
(make-mu4e-context (make-mu4e-context
:name "gmail" :name "gmail"
:match-func :match-func
(lambda (msg) (lambda (msg)
(when msg (when msg
(string-prefix-p "/gmail" (mu4e-message-field msg :maildir)))) (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
:vars '((user-mail-address . "ccochrun21@gmail.com") :vars '((user-mail-address . "ccochrun21@gmail.com")
(mu4e-sent-folder . "/gmail/[Gmail].Sent Mail/") (mu4e-sent-folder . "/gmail/[Gmail].Sent Mail/")
(smtpmail-smtp-user . "ccochrun21@gmail.com") (smtpmail-smtp-user . "ccochrun21@gmail.com")
(mu4e-compose-signature . "---\nChris Cochrun"))))) (mu4e-compose-signature . "---\nChris Cochrun")))))
;; Add the ability to send email for o365 ;; Add the ability to send email for o365
(setq message-send-mail-function 'smtpmail-send-it (setq message-send-mail-function 'smtpmail-send-it
starttls-use-gnutls t starttls-use-gnutls t
smtpmail-starttls-credentials '(("smtp.office365.com" 587 nil nil)) smtpmail-starttls-credentials '(("smtp.office365.com" 587 nil nil))
smtpmail-auth-credentials smtpmail-auth-credentials
'(("smtp.office365.com" 587 "chris@tfcconnection.org" nil)) '(("smtp.office365.com" 587 "chris@tfcconnection.org" nil))
smtpmail-default-smtp-server "smtp.office365.com" smtpmail-default-smtp-server "smtp.office365.com"
smtpmail-smtp-server "smtp.office365.com" smtpmail-smtp-server "smtp.office365.com"
smtpmail-smtp-service 587) smtpmail-smtp-service 587)
;; shortcuts in the jumplist by pressing "J" in the mu4e buffer ;; shortcuts in the jumplist by pressing "J" in the mu4e buffer
(setq mu4e-maildir-shortcuts (setq mu4e-maildir-shortcuts
'((:maildir "/office/Archive" :key ?a) '((:maildir "/office/Archive" :key ?a)
(:maildir "/office/INBOX" :key ?i) (:maildir "/office/INBOX" :key ?i)
(:maildir "/outlook/INBOX" :key ?l) (:maildir "/outlook/INBOX" :key ?l)
(:maildir "/office/Junk Email" :key ?j) (:maildir "/office/Junk Email" :key ?j)
(:maildir "/office/INBOX/Website Forms" :key ?f) (:maildir "/office/INBOX/Website Forms" :key ?f)
(:maildir "/gmail/INBOX" :key ?g) (:maildir "/gmail/INBOX" :key ?g)
(:maildir "/office/Sent Items" :key ?s))) (:maildir "/office/Sent Items" :key ?s)))
;; (add-to-list mu4e-headers-actions ("org capture message" . mu4e-org-store-and-capture)) ;; (add-to-list mu4e-headers-actions ("org capture message" . mu4e-org-store-and-capture))
(setq mu4e-bookmarks (setq mu4e-bookmarks
'((:name "Unread messages" '((:name "Unread messages"
:query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\"" :query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\""
:key 117) :key 117)
(:name "Today's messages" (:name "Today's messages"
:query "date:today..now" :query "date:today..now"
:key 116) :key 116)
(:name "Last 7 days" (:name "Last 7 days"
:query "date:7d..now" :query "date:7d..now"
:hide-unread t :hide-unread t
:key 119) :key 119)
(:name "Messages with images" (:name "Messages with images"
:query "mime:image/*" :query "mime:image/*"
:key 112))) :key 112)))
(setq mu4e-mu-binary "/usr/bin/mu") (setq mu4e-mu-binary "/usr/bin/mu")
(setq mu4e-use-fancy-chars t (setq mu4e-use-fancy-chars t
@ -1054,15 +1048,15 @@ If on a:
mu4e-headers-unread-mark '("u" . "")) mu4e-headers-unread-mark '("u" . ""))
(setq mu4e-headers-fields (setq mu4e-headers-fields
'((:human-date . 12) '((:human-date . 12)
(:flags . 6) (:flags . 6)
(:from . 22) (:from . 22)
(:subject))) (:subject)))
(setq mu4e-view-actions (setq mu4e-view-actions
'(("capture message" . mu4e-action-capture-message) '(("capture message" . mu4e-action-capture-message)
("view in browser" . mu4e-action-view-in-browser) ("view in browser" . mu4e-action-view-in-browser)
("show this thread" . mu4e-action-show-thread))) ("show this thread" . mu4e-action-show-thread)))
(defun chris/setup-mu4e-headers () (defun chris/setup-mu4e-headers ()
(toggle-truncate-lines +1) (toggle-truncate-lines +1)
@ -1204,9 +1198,9 @@ If on a:
(unless pop-eshell (unless pop-eshell
(setq pop-eshell (eshell 100)) (setq pop-eshell (eshell 100))
(with-current-buffer pop-eshell (with-current-buffer pop-eshell
(eshell/clear-scrollback) (eshell/clear-scrollback)
(rename-buffer "*eshell-pop*") (rename-buffer "*eshell-pop*")
(display-buffer-in-side-window pop-eshell '((side . bottom)))))) (display-buffer-in-side-window pop-eshell '((side . bottom))))))
(setq eshell-banner-message "") (setq eshell-banner-message "")
@ -1237,8 +1231,8 @@ If on a:
(use-package pdf-tools (use-package pdf-tools
:straight (:host github :straight (:host github
:repo "flatwhatson/pdf-tools" :repo "flatwhatson/pdf-tools"
:branch "fix-macros") :branch "fix-macros")
:defer 1 :defer 1
:config :config
(pdf-tools-install)) (pdf-tools-install))
@ -1265,33 +1259,33 @@ interfere with the default `bongo-playlist-buffer'."
(enclosure (elt (car (elfeed-entry-enclosures entry)) 0)) (enclosure (elt (car (elfeed-entry-enclosures entry)) 0))
(url (if (string-prefix-p "https://thumbnails" enclosure) (url (if (string-prefix-p "https://thumbnails" enclosure)
link link
enclosure)) enclosure))
(title (elfeed-entry-title entry)) (title (elfeed-entry-title entry))
(bongo-pl chris/elfeed-bongo-playlist) (bongo-pl chris/elfeed-bongo-playlist)
(buffer (get-buffer-create bongo-pl))) (buffer (get-buffer-create bongo-pl)))
(message "link is %s" link) (message "link is %s" link)
(message "enclosure is %s" enclosure) (message "enclosure is %s" enclosure)
(message "url is %s" url) (message "url is %s" url)
(message "title is %s" title) (message "title is %s" title)
(elfeed-search-untag-all-unread) (elfeed-search-untag-all-unread)
(unless (bongo-playlist-buffer) (unless (bongo-playlist-buffer)
(bongo-playlist-buffer)) (bongo-playlist-buffer))
(display-buffer buffer) (display-buffer buffer)
(with-current-buffer buffer (with-current-buffer buffer
(when (not (bongo-playlist-buffer-p)) (when (not (bongo-playlist-buffer-p))
(bongo-playlist-mode) (bongo-playlist-mode)
(setq-local bongo-library-buffer (get-buffer "*elfeed-search*")) (setq-local bongo-library-buffer (get-buffer "*elfeed-search*"))
(setq-local bongo-enabled-backends '(mpv)) (setq-local bongo-enabled-backends '(mpv))
(bongo-progressive-playback-mode)) (bongo-progressive-playback-mode))
(goto-char (point-max)) (goto-char (point-max))
(bongo-insert-uri url (format "%s ==> %s" title url)) (bongo-insert-uri url (format "%s ==> %s" title url))
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(delete-duplicate-lines (point-min) (point-max))) (delete-duplicate-lines (point-min) (point-max)))
(bongo-recenter)) (bongo-recenter))
(message "Enqueued %s “%s” in %s" (message "Enqueued %s “%s” in %s"
(if enclosure "podcast" "video") (if enclosure "podcast" "video")
(propertize title 'face 'italic) (propertize title 'face 'italic)
(propertize bongo-pl 'face 'bold)))) (propertize bongo-pl 'face 'bold))))
(defun chris/elfeed-bongo-switch-to-playlist () (defun chris/elfeed-bongo-switch-to-playlist ()
(interactive) (interactive)
@ -1299,7 +1293,7 @@ interfere with the default `bongo-playlist-buffer'."
(buffer (get-buffer bongo-pl))) (buffer (get-buffer bongo-pl)))
(if buffer (if buffer
(switch-to-buffer buffer) (switch-to-buffer buffer)
(message "No `bongo' playlist is associated with `elfeed'.")))) (message "No `bongo' playlist is associated with `elfeed'."))))
:general :general
@ -1329,14 +1323,14 @@ interfere with the default `bongo-playlist-buffer'."
:matcher '((local-file "file:" "http:" "ftp:" "lbry:") :matcher '((local-file "file:" "http:" "ftp:" "lbry:")
"ogg" "flac" "mp3" "mka" "wav" "wma" "ogg" "flac" "mp3" "mka" "wav" "wma"
"mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4" "mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4"
"mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts") "mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts")
:matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:" :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:"
"dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:" "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:"
"cue:" "sdp:" "mpst:" "tivo:") . t) "cue:" "sdp:" "mpst:" "tivo:") . t)
:matcher '(("http:" "https:" "lbry:") . t)) :matcher '(("http:" "https:" "lbry:") . t))
(setq bongo-enabled-backends '(mpv) (setq bongo-enabled-backends '(mpv)
bongo-track-mark-icon-file-name "track-mark-icon.png") bongo-track-mark-icon-file-name "track-mark-icon.png")
(defun chris/bongo-mark-line-forward () (defun chris/bongo-mark-line-forward ()
(interactive) (interactive)
@ -1367,17 +1361,17 @@ interfere with the default `bongo-playlist-buffer'."
(if (string-equal (system-name) "syl") (if (string-equal (system-name) "syl")
(setq transmission-host "home.cochrun.xyz" (setq transmission-host "home.cochrun.xyz"
transmission-rpc-path "/transmission/rpc" transmission-rpc-path "/transmission/rpc"
transmission-refresh-modes '(transmission-mode transmission-refresh-modes '(transmission-mode
transmission-files-mode transmission-files-mode
transmission-info-mode transmission-info-mode
transmission-peers-mode)) transmission-peers-mode))
(setq transmission-host "192.168.1.2" (setq transmission-host "192.168.1.2"
transmission-rpc-path "/transmission/rpc" transmission-rpc-path "/transmission/rpc"
transmission-refresh-modes '(transmission-mode transmission-refresh-modes '(transmission-mode
transmission-files-mode transmission-files-mode
transmission-info-mode transmission-info-mode
transmission-peers-mode))) transmission-peers-mode)))
:general :general
(chris/leader-keys (chris/leader-keys
:states 'normal :states 'normal
@ -1439,7 +1433,7 @@ interfere with the default `bongo-playlist-buffer'."
(gcmh-mode) (gcmh-mode)
:config :config
(setq gcmh-idle-delay 5 (setq gcmh-idle-delay 5
gcmh-high-cons-threshold (* 128 1024 1024) ; 128mb gcmh-high-cons-threshold (* 128 1024 1024) ; 128mb
gcmh-verbose t)) gcmh-verbose t))
(setq warning-suppress-types '((comp))) (setq warning-suppress-types '((comp)))