better things

This commit is contained in:
Chris Cochrun 2023-06-17 06:37:40 -05:00
parent 48d6cb476f
commit 1dee0c5c5f
2 changed files with 128 additions and 35 deletions

View file

@ -283,6 +283,14 @@ Probably the prettiest and best modeline I've found.
(setq doom-modeline-icon t))))))
#+end_src
#+begin_src emacs-lisp
(use-package nano-modeline
:config
(setq nano-modeline-space-top 0.25
nano-modeline-space-bottom -0.25
nano-modeline-prefix 'icon))
#+end_src
Again, doom is pretty and I have fallen in love with the snazzy theme and use it about anywhere I can.
#+begin_src emacs-lisp
(use-package doom-themes
@ -553,7 +561,8 @@ This evil-collection package includes a lot of other evil based things.
(general-def 'insert prog-mode-map
:states 'insert
:keymaps 'override
"TAB" 'indent-according-to-mode))
"TAB" 'indent-according-to-mode
"C-<tab>" 'indent-for-tab-command))
#+end_src
#+begin_src emacs-lisp
@ -736,9 +745,6 @@ Part of this config includes some special capture templates for my work as a you
("n" "Personal notes" entry
(file "todo/notes.org")
"* %u %?\n%i\n%a" :prepend t)
("j" "Journal" entry
(file+olp+datetree +org-capture-journal-file)
"* %U %?\n%i\n%a" :prepend t)
("p" "TFC Plan" entry
(function chris/org-roam-capture-lesson-file)
(file ".templates/tfcplantemplate.org")
@ -798,7 +804,9 @@ Part of this config includes some special capture templates for my work as a you
"/home/chris/org/archive.org"
"/home/chris/org/nvtfc_social_media.org"
"/home/chris/dev/church-presenter/TODO.org"
"/home/chris/org/lessons/")
"/home/chris/dev/tfcconnection/TODO.org"
"/home/chris/org/lessons/"
"/home/chris/org/daily/")
org-id-method 'ts
org-agenda-tags-column -75
org-columns-summary-types '(("+" . org-columns--summary-sum)
@ -866,7 +874,8 @@ Part of this config includes some special capture templates for my work as a you
:states 'normal
:keymaps 'org-mode-map
"is" 'org-time-stamp
"tp" (chris/org-cycle-hide-drawers 'children))
"tp" (chris/org-cycle-hide-drawers 'children)
"iw" 'org-web-tools-insert-web-page-as-entry)
(chris/leader-keys
:states 'visual
:keymaps 'override
@ -907,7 +916,7 @@ Part of this config includes some special capture templates for my work as a you
"q" 'org-edit-src-abort))
#+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-node-read= to pick the lesson file that I need to add my lesson plan to. This way the lesson itself is created before the plan.
#+begin_src emacs-lisp
(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"
@ -996,8 +1005,9 @@ We also need to setup some capture templates to use some specific setups with my
(setq org-roam-directory "~/org"
org-roam-buffer-width 0.25
org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*"
org-roam-db-location "~/.dotemacs/org-roam.db"
org-roam-db-location "~/.emacs.d/org-roam.db"
org-roam-completion-everywhere t
org-roam-dailies-directory "dailies/"
org-roam-capture-templates
'(("d" "default" entry "\n* %?"
:if-new (file+head "${slug}.org"
@ -1023,7 +1033,19 @@ We also need to setup some capture templates to use some specific setups with my
("b" "biblical daily" plain "%?"
:file-name "%<%Y-%m-%d>-bib"
:target (file+head "%<%Y-%m-%d>-bib.org" "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* Notes")
:unnarrowed t)
("m" "meeting" plain "%?"
:file-name "%<%Y-%m-%d>-meeting-${slug}"
:target (file+head "%<%Y-%m-%d>-meeting-${slug}.org" "#+TITLE: %<%Y-%m-%d> - ${slug}
#+AUTHOR: Chris Cochrun
#+CREATED: %<%D - %I:%M %p>
* Attendees
-
* Notes")
:unnarrowed t)))
(defun chris/org-roam-node-create ()
"Create an org roam node underneath this org node"
(interactive)
@ -1894,6 +1916,10 @@ Builtin webbrowser for emacs. Trying it out as a text only browser for things.
(general-def 'normal eww-mode-map
"gv" 'chris/eww-mpv
"gV" 'chris/eww-video-dl)
(chris/leader-keys
:state 'normal
:keymap 'eww-mode-map
"fs" '(eww-browse :which-key "browse"))
#+end_src
** Completion
@ -2640,6 +2666,11 @@ Also here are some lisp specific stuff
:config
(smartparens-global-mode +1)
:general
('normal emacs-lisp-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
"C-l" 'sp-forward-sexp
"C-h" 'sp-backward-sexp)
('normal lisp-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
@ -2779,7 +2810,10 @@ Since I use the Awesome WM I thought it'd be good to have lua around. It's also
I've been transitioning more of my OS to NixOS. Let's get =nix-mode= working.
#+begin_src emacs-lisp
(use-package nix-mode
:mode "\\.nix\\'")
:mode "\\.nix\\'"
:general
(chris/leader-keys 'normal 'override
"xf" 'nix-flake))
#+end_src
*** LSP
@ -3214,7 +3248,7 @@ Ledger mode
(use-package mu4e
:load-path "/usr/share/emacs/site-lisp/mu4e/"
:init
(setq mu4e-maildir "~/Maildir"
(setq mu4e-maildir "~/mail"
user-full-name "Chris Cochrun"
mu4e-change-filenames-when-moving t
mu4e-get-mail-command "mbsync -a"
@ -3302,13 +3336,11 @@ Ledger mode
;; shortcuts in the jumplist by pressing "J" in the mu4e buffer
(setq mu4e-maildir-shortcuts
'((:maildir "/office/Archive" :key ?a)
(:maildir "/office/INBOX" :key ?i)
(:maildir "/cochrun/INBOX" :key ?p)
(:maildir "/outlook/INBOX" :key ?l)
'((:maildir "/cochrun/Archive" :key ?a)
(:maildir "/cochrun/INBOX" :key ?i)
(:maildir "/office/INBOX" :key ?w)
(:maildir "/office/Junk Email" :key ?j)
(:maildir "/office/INBOX/Website Forms" :key ?f)
(:maildir "/gmail/INBOX" :key ?g)
(:maildir "/office/Sent Items" :key ?s)))
;; (add-to-list mu4e-headers-actions ("org capture message" . mu4e-org-store-and-capture))
@ -3362,10 +3394,11 @@ Ledger mode
(defun chris/setup-mu4e-view ()
(display-line-numbers-mode -1)
(toggle-truncate-lines +1)
(setq visual-fill-column-center-text t)
(setq visual-fill-column-width 100)
(visual-fill-column-mode +1))
(visual-fill-column-mode +1)
(visual-line-mode -1)
(toggle-truncate-lines +1))
(remove-hook 'mu4e-main-mode-hook '(display-line-numbers-mode -1))
(add-hook 'mu4e-headers-mode-hook #'chris/setup-mu4e-headers)
@ -3873,6 +3906,13 @@ interfere with the default `bongo-playlist-buffer'."
(setq shr-use-colors nil)
(defun chris/efleed-org-view ()
"Display the url of the entry as an org-mode buffer"
(interactive)
(let ((link (elfeed-entry-link elfeed-show-entry)))
(message link)
(org-web-tools-read-url-as-org link)))
(defun chris/elfeed-eww-browse ()
(interactive)
(let* ((entry (elfeed-search-selected :ignore-region))
@ -3889,11 +3929,24 @@ interfere with the default `bongo-playlist-buffer'."
(general-def 'normal elfeed-search-mode-map
"v" 'chris/elfeed-bongo-insert-item
"h" 'chris/elfeed-bongo-switch-to-playlist
"b" 'chris/elfeed-eww-browse)
"b" 'chris/elfeed-eww-browse
"o" 'chris/elfeed-org-view)
(general-def 'normal elfeed-show-mode-map
"o" 'chris/elfeed-org-view
"b" 'eww))
#+end_src
#+begin_src emacs-lisp :tangle no
(use-package elfeed-protocol
:ensure t
:config
(setq elfeed-feeds '(("owncloud+https://chris@nc.cochrun.xyz"
:password (s-trim
(shell-command-to-string "rbw get 'nextcloud home'")))))
(setq elfeed-protocol-enabled-protocols '(fever newsblur owncloud ttrss))
(elfeed-protocol-enable))
#+end_src
#+begin_src emacs-lisp
(use-package elfeed-org
:after elfeed

74
init.el
View file

@ -122,6 +122,12 @@
(with-selected-frame frame
(setq doom-modeline-icon t))))))
(use-package nano-modeline
:config
(setq nano-modeline-space-top 0.25
nano-modeline-space-bottom -0.25
nano-modeline-prefix 'icon))
(use-package doom-themes
:ensure t
:init (load-theme 'doom-snazzy t))
@ -321,7 +327,8 @@
(general-def 'insert prog-mode-map
:states 'insert
:keymaps 'override
"TAB" 'indent-according-to-mode))
"TAB" 'indent-according-to-mode
"C-<tab>" 'indent-for-tab-command))
(use-package evil-escape
:after evil
@ -489,9 +496,6 @@ much faster. The hope is to also make this a faster version of imenu."
("n" "Personal notes" entry
(file "todo/notes.org")
"* %u %?\n%i\n%a" :prepend t)
("j" "Journal" entry
(file+olp+datetree +org-capture-journal-file)
"* %U %?\n%i\n%a" :prepend t)
("p" "TFC Plan" entry
(function chris/org-roam-capture-lesson-file)
(file ".templates/tfcplantemplate.org")
@ -551,7 +555,9 @@ much faster. The hope is to also make this a faster version of imenu."
"/home/chris/org/archive.org"
"/home/chris/org/nvtfc_social_media.org"
"/home/chris/dev/church-presenter/TODO.org"
"/home/chris/org/lessons/")
"/home/chris/dev/tfcconnection/TODO.org"
"/home/chris/org/lessons/"
"/home/chris/org/daily/")
org-id-method 'ts
org-agenda-tags-column -75
org-columns-summary-types '(("+" . org-columns--summary-sum)
@ -619,7 +625,8 @@ much faster. The hope is to also make this a faster version of imenu."
:states 'normal
:keymaps 'org-mode-map
"is" 'org-time-stamp
"tp" (chris/org-cycle-hide-drawers 'children))
"tp" (chris/org-cycle-hide-drawers 'children)
"iw" 'org-web-tools-insert-web-page-as-entry)
(chris/leader-keys
:states 'visual
:keymaps 'override
@ -725,8 +732,9 @@ much faster. The hope is to also make this a faster version of imenu."
(setq org-roam-directory "~/org"
org-roam-buffer-width 0.25
org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*"
org-roam-db-location "~/.dotemacs/org-roam.db"
org-roam-db-location "~/.emacs.d/org-roam.db"
org-roam-completion-everywhere t
org-roam-dailies-directory "dailies/"
org-roam-capture-templates
'(("d" "default" entry "\n* %?"
:if-new (file+head "${slug}.org"
@ -752,7 +760,19 @@ much faster. The hope is to also make this a faster version of imenu."
("b" "biblical daily" plain "%?"
:file-name "%<%Y-%m-%d>-bib"
:target (file+head "%<%Y-%m-%d>-bib.org" "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* Notes")
:unnarrowed t)
("m" "meeting" plain "%?"
:file-name "%<%Y-%m-%d>-meeting-${slug}"
:target (file+head "%<%Y-%m-%d>-meeting-${slug}.org" "#+TITLE: %<%Y-%m-%d> - ${slug}
#+AUTHOR: Chris Cochrun
#+CREATED: %<%D - %I:%M %p>
* Attendees
-
* Notes")
:unnarrowed t)))
(defun chris/org-roam-node-create ()
"Create an org roam node underneath this org node"
(interactive)
@ -1476,6 +1496,10 @@ All my (performant) foldings needs are met between this and `org-show-subtree'
(general-def 'normal eww-mode-map
"gv" 'chris/eww-mpv
"gV" 'chris/eww-video-dl)
(chris/leader-keys
:state 'normal
:keymap 'eww-mode-map
"fs" '(eww-browse :which-key "browse"))
(use-package vertico
:init
@ -1988,6 +2012,11 @@ targets."
:config
(smartparens-global-mode +1)
:general
('normal emacs-lisp-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
"C-l" 'sp-forward-sexp
"C-h" 'sp-backward-sexp)
('normal lisp-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
@ -2092,7 +2121,10 @@ targets."
:mode ("\\.lua\\'" . lua-mode))
(use-package nix-mode
:mode "\\.nix\\'")
:mode "\\.nix\\'"
:general
(chris/leader-keys 'normal 'override
"xf" 'nix-flake))
(use-package eglot
:commands eglot
@ -2327,7 +2359,7 @@ targets."
(use-package mu4e
:load-path "/usr/share/emacs/site-lisp/mu4e/"
:init
(setq mu4e-maildir "~/Maildir"
(setq mu4e-maildir "~/mail"
user-full-name "Chris Cochrun"
mu4e-change-filenames-when-moving t
mu4e-get-mail-command "mbsync -a"
@ -2415,13 +2447,11 @@ targets."
;; shortcuts in the jumplist by pressing "J" in the mu4e buffer
(setq mu4e-maildir-shortcuts
'((:maildir "/office/Archive" :key ?a)
(:maildir "/office/INBOX" :key ?i)
(:maildir "/cochrun/INBOX" :key ?p)
(:maildir "/outlook/INBOX" :key ?l)
'((:maildir "/cochrun/Archive" :key ?a)
(:maildir "/cochrun/INBOX" :key ?i)
(:maildir "/office/INBOX" :key ?w)
(:maildir "/office/Junk Email" :key ?j)
(:maildir "/office/INBOX/Website Forms" :key ?f)
(:maildir "/gmail/INBOX" :key ?g)
(:maildir "/office/Sent Items" :key ?s)))
;; (add-to-list mu4e-headers-actions ("org capture message" . mu4e-org-store-and-capture))
@ -2475,10 +2505,11 @@ targets."
(defun chris/setup-mu4e-view ()
(display-line-numbers-mode -1)
(toggle-truncate-lines +1)
(setq visual-fill-column-center-text t)
(setq visual-fill-column-width 100)
(visual-fill-column-mode +1))
(visual-fill-column-mode +1)
(visual-line-mode -1)
(toggle-truncate-lines +1))
(remove-hook 'mu4e-main-mode-hook '(display-line-numbers-mode -1))
(add-hook 'mu4e-headers-mode-hook #'chris/setup-mu4e-headers)
@ -2905,6 +2936,13 @@ interfere with the default `bongo-playlist-buffer'."
(setq shr-use-colors nil)
(defun chris/efleed-org-view ()
"Display the url of the entry as an org-mode buffer"
(interactive)
(let ((link (elfeed-entry-link elfeed-show-entry)))
(message link)
(org-web-tools-read-url-as-org link)))
(defun chris/elfeed-eww-browse ()
(interactive)
(let* ((entry (elfeed-search-selected :ignore-region))
@ -2921,8 +2959,10 @@ interfere with the default `bongo-playlist-buffer'."
(general-def 'normal elfeed-search-mode-map
"v" 'chris/elfeed-bongo-insert-item
"h" 'chris/elfeed-bongo-switch-to-playlist
"b" 'chris/elfeed-eww-browse)
"b" 'chris/elfeed-eww-browse
"o" 'chris/elfeed-org-view)
(general-def 'normal elfeed-show-mode-map
"o" 'chris/elfeed-org-view
"b" 'eww))
(use-package elfeed-org