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

This commit is contained in:
Chris Cochrun 2021-08-16 06:16:07 -05:00
commit 034b91b880
2 changed files with 101 additions and 65 deletions

View file

@ -34,7 +34,7 @@
- [[#bongo][Bongo]] - [[#bongo][Bongo]]
- [[#transmission][Transmission]] - [[#transmission][Transmission]]
- [[#pass][Pass]] - [[#pass][Pass]]
- [[#matrix][Matrix]] - [[#matrixement][Matrix/Ement]]
- [[#activitywatch][ActivityWatch]] - [[#activitywatch][ActivityWatch]]
- [[#mybible][MyBible]] - [[#mybible][MyBible]]
- [[#performance][Performance]] - [[#performance][Performance]]
@ -606,10 +606,10 @@ Marginalia makes for some great decoration to our minibuffer completion items. W
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package marginalia (use-package marginalia
:bind (:map minibuffer-local-map :bind (:map minibuffer-local-map
("C-M-a" . marginalia-cycle) ("C-M-a" . marginalia-cycle)
;; :map embark-general-map ;; :map embark-general-map
;; ("A" . marginalia-cycle) ;; ("A" . marginalia-cycle)
) )
;; The :init configuration is always executed (Not lazy!) ;; The :init configuration is always executed (Not lazy!)
:init :init
@ -624,7 +624,10 @@ Marginalia makes for some great decoration to our minibuffer completion items. W
;; Prefer richer, more heavy, annotations over the lighter default variant. ;; Prefer richer, more heavy, annotations over the lighter default variant.
(setq marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil)) (setq marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil))
:after selectrum) :after selectrum
:config
(setq marginalia--cache-size 60000))
#+end_src #+end_src
*** Company *** Company
@ -709,6 +712,10 @@ Ace link provides an avy like search for links. Upon using the keybindings prese
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . right) (side . right)
(window-width . 0.4)) (window-width . 0.4))
("*org-roam*"
(display-buffer-in-side-window)
(side . right)
(window-width . 0.4))
("\\*elfeed-entry\\*" ("\\*elfeed-entry\\*"
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . bottom) (side . bottom)
@ -1065,10 +1072,10 @@ Part of this config includes some special capture templates for my work as a you
(setq org-capture-templates (setq org-capture-templates
'(("t" "Personal todo" entry '(("t" "Personal todo" entry
(file+headline "todo.org" "Inbox") (file+headline "todo/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 "todo/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)
@ -1080,7 +1087,7 @@ Part of this config includes some special capture templates for my work as a you
: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 "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)
@ -1112,13 +1119,13 @@ Part of this config includes some special capture templates for my work as a you
'((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)") '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)")
(sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)")) (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))
org-agenda-files org-agenda-files
'("/home/chris/org/inbox.org" '("/home/chris/org/todo/inbox.org"
"/home/chris/org/notes.org" "/home/chris/org/todo/notes.org"
"/home/chris/org/repetition.org" "/home/chris/org/repetition.org"
"/home/chris/org/tasks.org" "/home/chris/org/tasks.org"
"/home/chris/org/tfc_plans.org" "/home/chris/org/tfc_plans.org"
"/home/chris/org/ministry_team.org" "/home/chris/org/ministry_team.org"
"/home/chris/org/todo.org" "/home/chris/org/todo/todo.org"
"/home/chris/org/newsletter.org" "/home/chris/org/newsletter.org"
"/home/chris/org/nvtfc_social_media.org" "/home/chris/org/nvtfc_social_media.org"
"/home/chris/org/lessons/") "/home/chris/org/lessons/")
@ -1259,9 +1266,7 @@ 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 :ensure t
:hook
(after-init . org-roam-mode)
:config :config
(setq org-roam-directory "~/org" (setq org-roam-directory "~/org"
org-roam-buffer-width 0.25 org-roam-buffer-width 0.25
@ -1291,13 +1296,18 @@ We also need to setup some capture templates to use some specific setups with my
:immediate-finish t :immediate-finish t
:file-name "%<%Y-%m-%d>-bib" :file-name "%<%Y-%m-%d>-bib"
:head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun"))) :head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
(org-roam-setup)
(setq org-roam-v2-ack t)
:general :general
(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-node-find :which-key "org roam ff")
"nr" 'org-roam "nr" 'org-roam-buffer-toggle
"ni" 'org-roam-insert)) "ni" 'org-roam-node-insert
"nc" 'org-roam-capture
"njt" 'org-roam-dailies-capture-today
"ng" 'org-roam-graph))
#+END_SRC #+END_SRC
@ -1305,19 +1315,16 @@ We also need to setup some capture templates to use some specific setups with my
Org-Roam server. This let's me visualize my notes. Org-Roam server. This let's me visualize my notes.
In order to use it, I need to go to http://localhost:8080 In order to use it, I need to go to http://localhost:8080
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package org-roam-server (use-package websocket)
(use-package org-roam-ui
:straight (:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out"))
:after org-roam
:config :config
(setq org-roam-server-host "127.0.0.1" (setq org-roam-ui-sync-theme t
org-roam-server-port 8080 org-roam-ui-follow t
org-roam-server-export-inline-images t org-roam-ui-update-on-save t
org-roam-server-authenticate nil org-roam-ui-open-on-start t))
org-roam-server-serve-files t
org-roam-server-network-label-truncate t
org-roam-server-network-label-truncate-length 60
org-roam-server-network-label-wrap-length 20)
:after org-roam)
(add-hook 'org-roam-mode-hook org-roam-server-mode t)
#+END_SRC #+END_SRC
*** Org-Superstar *** Org-Superstar
Org-Superstar makes the stars at the beginning of the line in =org-mode= a lot prettier. Org-Superstar makes the stars at the beginning of the line in =org-mode= a lot prettier.
@ -1799,9 +1806,7 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
(add-hook 'eshell-mode-hook '(display-line-numbers-mode -1)) (add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
(setq eshell-command-aliases-list (setq eshell-command-aliases-list
'(("ls" "exa $1") '(("q" "exit")
("la" "exa -la $1")
("q" "exit")
("f" "find-file $1") ("f" "find-file $1")
("ff" "find-file $1") ("ff" "find-file $1")
("d" "dired $1") ("d" "dired $1")
@ -1949,6 +1954,7 @@ interfere with the default `bongo-playlist-buffer'."
:matcher '(("http:" "https:" "lbry:") . t)) :matcher '(("http:" "https:" "lbry:") . t))
(setq bongo-enabled-backends '(mpv) (setq bongo-enabled-backends '(mpv)
bongo-mpv-extra-arguments '("--profile=fast")
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 ()
@ -2046,11 +2052,22 @@ I like to keep my passwords in password-store for a very unixy way of doing thin
"st" 'password-store-otp-token-copy)) "st" 'password-store-otp-token-copy))
#+end_src #+end_src
** Matrix ** Matrix/Ement
Matrix.el is a decent enough matrix client built in emacs. Like it. Matrix.el is a decent enough matrix client built in emacs. Like it.
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp
(use-package matrix-client (use-package plz
:straight (matrix-client :type git :host github :repo "alphapapa/matrix-client.el")) :straight (plz :type git :host github :repo "alphapapa/plz.el"))
(use-package ement
:straight (ement :type git :host github :repo "alphapapa/ement.el")
:config
(setq ement-room-images t)
:general
(general-def 'normal ement-room-mode-map
"q" 'bury-buffer
"RET" 'ement-room-send-message)
(chris/leader-keys
"oM" 'ement-list-rooms))
#+end_src #+end_src
** ActivityWatch ** ActivityWatch

77
init.el
View file

@ -50,7 +50,8 @@
(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))
(setq display-line-numbers-type 'relative) (setq display-line-numbers-type 'relative)
(global-display-line-numbers-mode +1) (global-display-line-numbers-mode +1)
@ -360,7 +361,9 @@ vertically."
;; Prefer richer, more heavy, annotations over the lighter default variant. ;; Prefer richer, more heavy, annotations over the lighter default variant.
(setq marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil)) (setq marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil))
:after selectrum) :after selectrum
:config
(setq marginalia--cache-size 60000))
(use-package company (use-package company
:config :config
@ -417,6 +420,10 @@ vertically."
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . right) (side . right)
(window-width . 0.4)) (window-width . 0.4))
("*org-roam*"
(display-buffer-in-side-window)
(side . right)
(window-width . 0.4))
("\\*elfeed-entry\\*" ("\\*elfeed-entry\\*"
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . bottom) (side . bottom)
@ -669,10 +676,10 @@ vertically."
(setq org-capture-templates (setq org-capture-templates
'(("t" "Personal todo" entry '(("t" "Personal todo" entry
(file+headline "todo.org" "Inbox") (file+headline "todo/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 "todo/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)
@ -684,7 +691,7 @@ vertically."
: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 "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)
@ -716,13 +723,13 @@ vertically."
'((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)") '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)")
(sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)")) (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))
org-agenda-files org-agenda-files
'("/home/chris/org/inbox.org" '("/home/chris/org/todo/inbox.org"
"/home/chris/org/notes.org" "/home/chris/org/todo/notes.org"
"/home/chris/org/repetition.org" "/home/chris/org/repetition.org"
"/home/chris/org/tasks.org" "/home/chris/org/tasks.org"
"/home/chris/org/tfc_plans.org" "/home/chris/org/tfc_plans.org"
"/home/chris/org/ministry_team.org" "/home/chris/org/ministry_team.org"
"/home/chris/org/todo.org" "/home/chris/org/todo/todo.org"
"/home/chris/org/newsletter.org" "/home/chris/org/newsletter.org"
"/home/chris/org/nvtfc_social_media.org" "/home/chris/org/nvtfc_social_media.org"
"/home/chris/org/lessons/") "/home/chris/org/lessons/")
@ -840,9 +847,7 @@ vertically."
(use-package org-roam (use-package org-roam
:after org :after org
;; :ensure t :ensure t
:hook
(after-init . org-roam-mode)
:config :config
(setq org-roam-directory "~/org" (setq org-roam-directory "~/org"
org-roam-buffer-width 0.25 org-roam-buffer-width 0.25
@ -872,27 +877,28 @@ vertically."
:immediate-finish t :immediate-finish t
:file-name "%<%Y-%m-%d>-bib" :file-name "%<%Y-%m-%d>-bib"
:head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun"))) :head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
(org-roam-setup)
(setq org-roam-v2-ack t)
:general :general
(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-node-find :which-key "org roam ff")
"nr" 'org-roam "nr" 'org-roam-buffer-toggle
"ni" 'org-roam-insert)) "ni" 'org-roam-node-insert
"nc" 'org-roam-capture
"njt" 'org-roam-dailies-capture-today
"ng" 'org-roam-graph))
(use-package org-roam-server (use-package websocket)
(use-package org-roam-ui
:straight (:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out"))
:after org-roam
:config :config
(setq org-roam-server-host "127.0.0.1" (setq org-roam-ui-sync-theme t
org-roam-server-port 8080 org-roam-ui-follow t
org-roam-server-export-inline-images t org-roam-ui-update-on-save t
org-roam-server-authenticate nil org-roam-ui-open-on-start t))
org-roam-server-serve-files t
org-roam-server-network-label-truncate t
org-roam-server-network-label-truncate-length 60
org-roam-server-network-label-wrap-length 20)
:after org-roam)
(add-hook 'org-roam-mode-hook org-roam-server-mode t)
(use-package org-superstar (use-package org-superstar
:after org :after org
@ -1340,9 +1346,7 @@ If on a:
(add-hook 'eshell-mode-hook '(display-line-numbers-mode -1)) (add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
(setq eshell-command-aliases-list (setq eshell-command-aliases-list
'(("ls" "exa $1") '(("q" "exit")
("la" "exa -la $1")
("q" "exit")
("f" "find-file $1") ("f" "find-file $1")
("ff" "find-file $1") ("ff" "find-file $1")
("d" "dired $1") ("d" "dired $1")
@ -1471,6 +1475,7 @@ interfere with the default `bongo-playlist-buffer'."
:matcher '(("http:" "https:" "lbry:") . t)) :matcher '(("http:" "https:" "lbry:") . t))
(setq bongo-enabled-backends '(mpv) (setq bongo-enabled-backends '(mpv)
bongo-mpv-extra-arguments '("--profile=fast")
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 ()
@ -1553,6 +1558,20 @@ interfere with the default `bongo-playlist-buffer'."
(chris/leader-keys (chris/leader-keys
"st" 'password-store-otp-token-copy)) "st" 'password-store-otp-token-copy))
(use-package plz
:straight (plz :type git :host github :repo "alphapapa/plz.el"))
(use-package ement
:straight (ement :type git :host github :repo "alphapapa/ement.el")
:config
(setq ement-room-images t)
:general
(general-def 'normal ement-room-mode-map
"q" 'bury-buffer
"RET" 'ement-room-send-message)
(chris/leader-keys
"oM" 'ement-list-rooms))
(use-package activity-watch-mode (use-package activity-watch-mode
:init :init
(if (string-equal (system-name) "syl") (if (string-equal (system-name) "syl")