Some changes of things

This commit is contained in:
Chris Cochrun 2021-08-14 09:39:21 -05:00
parent 178638f314
commit f562775f5c
2 changed files with 131 additions and 96 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]]
@ -605,10 +605,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
@ -623,7 +623,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
@ -708,6 +711,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)
@ -1255,9 +1262,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
@ -1287,13 +1292,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
@ -1301,19 +1311,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.
@ -1795,9 +1802,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")
@ -1945,6 +1950,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 ()
@ -2042,11 +2048,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

150
init.el
View file

@ -2,9 +2,9 @@
(defun chris/display-startup-time () (defun chris/display-startup-time ()
(message "Emacs loaded in %s with %d garbage collections." (message "Emacs loaded in %s with %d garbage collections."
(format "%.2f seconds" (format "%.2f seconds"
(float-time (float-time
(time-subtract after-init-time before-init-time))) (time-subtract after-init-time before-init-time)))
gcs-done)) gcs-done))
(add-hook 'emacs-startup-hook #'chris/display-startup-time) (add-hook 'emacs-startup-hook #'chris/display-startup-time)
(setq inhibit-startup-message t) (setq inhibit-startup-message t)
@ -48,7 +48,7 @@
(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))
(setq display-line-numbers-type 'relative) (setq display-line-numbers-type 'relative)
@ -65,7 +65,7 @@
;; ...especially on linux ;; ...especially on linux
(setq x-gtk-use-system-tooltips nil) (setq x-gtk-use-system-tooltips nil)
;; Favor vertical splits over horizontal ones. Screens are usually wide. ;; Favor vertical splits over horizontal ones. Screens are usually wide.
(setq split-width-threshold 160 (setq split-width-threshold 160
split-height-threshold nil) split-height-threshold nil)
@ -99,8 +99,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)
@ -294,19 +294,19 @@
;; We need to fix selectrums minibuffer handling for Emacs 28 ;; We need to fix selectrums minibuffer handling for Emacs 28
(defun selectrum--set-window-height (window &optional height) (defun selectrum--set-window-height (window &optional height)
"Set window height of WINDOW to HEIGHT pixel. "Set window height of WINDOW to HEIGHT pixel.
If HEIGHT is not given WINDOW will be updated to fit its content If HEIGHT is not given WINDOW will be updated to fit its content
vertically." vertically."
(let* ((lines (length (let* ((lines (length
(split-string (split-string
(overlay-get selectrum--candidates-overlay 'after-string) (overlay-get selectrum--candidates-overlay 'after-string)
"\n" t))) "\n" t)))
(dheight (or height (dheight (or height
(* lines selectrum--line-height))) (* lines selectrum--line-height)))
(wheight (window-pixel-height window)) (wheight (window-pixel-height window))
(window-resize-pixelwise t)) (window-resize-pixelwise t))
(window-resize (window-resize
window (- dheight wheight) nil nil 'pixelwise))) window (- dheight wheight) nil nil 'pixelwise)))
:general :general
@ -359,7 +359,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
@ -416,6 +418,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)
@ -483,7 +489,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
@ -819,26 +825,24 @@ vertically."
:after org :after org
:init :init
(setq org-super-agenda-groups '((:name "Today" (setq org-super-agenda-groups '((:name "Today"
:time-grid t :time-grid t
:scheduled today) :scheduled today)
(:name "Due Today" (:name "Due Today"
:deadline today) :deadline today)
(:name "Important" (:name "Important"
:priority "A") :priority "A")
(:name "Overdue" (:name "Overdue"
:time-grid t :time-grid t
:scheduled today) :scheduled today)
(:name "Due soon" (:name "Due soon"
:deadline future))) :deadline future)))
:config :config
(org-super-agenda-mode) (org-super-agenda-mode)
(setq org-super-agenda-header-map nil)) (setq org-super-agenda-header-map nil))
(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
@ -868,27 +872,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
@ -1336,20 +1341,18 @@ 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") ("f" "find-file $1")
("q" "exit") ("ff" "find-file $1")
("f" "find-file $1") ("d" "dired $1")
("ff" "find-file $1") ("bd" "eshell-up $1")
("d" "dired $1") ("rg" "rg --color=always $*")
("bd" "eshell-up $1") ("ll" "ls -lah $*")
("rg" "rg --color=always $*") ("gg" "magit-status")
("ll" "ls -lah $*") ("clear" "clear-scrollback")
("gg" "magit-status") ("!c" "eshell-previous-input 2")
("clear" "clear-scrollback") ("yay" "paru $1")
("!c" "eshell-previous-input 2") ("yeet" "paru -Rns $1")))
("yay" "paru $1")
("yeet" "paru -Rns $1")))
:general :general
(chris/leader-keys (chris/leader-keys
@ -1364,8 +1367,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)
@ -1467,6 +1470,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 ()
@ -1524,11 +1528,11 @@ interfere with the default `bongo-playlist-buffer'."
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
:keymaps 'override :keymaps 'override
"ot" 'transmission)) "ot" 'transmission))
(use-package auth-source-pass (use-package auth-source-pass
:defer 1 :defer 1
@ -1549,6 +1553,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")