Merge branch 'master' of gitlab.com:chriscochrun/dotemacs
This commit is contained in:
commit
784f8413d2
151
README.org
151
README.org
|
@ -273,30 +273,32 @@ This evil-collection package includes a lot of other evil based things.
|
||||||
:keymaps '(normal visual emacs)
|
:keymaps '(normal visual emacs)
|
||||||
:prefix "SPC")
|
:prefix "SPC")
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
"b" '(:ignore t :which-key "buffer")
|
:states 'normal
|
||||||
"t" '(:ignore t :which-key "toggle")
|
:keymaps 'override
|
||||||
"f" '(:ignore t :which-key "file")
|
"b" '(:ignore t :which-key "buffer")
|
||||||
"w" '(:ignore t :which-key "window")
|
"t" '(:ignore t :which-key "toggle")
|
||||||
"s" '(:ignore t :which-key "search")
|
"f" '(:ignore t :which-key "file")
|
||||||
"o" '(:ignore t :which-key "open")
|
"w" '(:ignore t :which-key "window")
|
||||||
"h" '(:ignore t :which-key "help")
|
"s" '(:ignore t :which-key "search")
|
||||||
"n" '(:ignore t :which-key "notes")
|
"o" '(:ignore t :which-key "open")
|
||||||
"bs" '(consult-buffer :which-key "buffer search")
|
"h" '(:ignore t :which-key "help")
|
||||||
"bd" '(kill-this-buffer :which-key "kill buffer")
|
"n" '(:ignore t :which-key "notes")
|
||||||
"bi" '(ibuffer :which-key "ibuffer")
|
"bs" '(consult-buffer :which-key "buffer search")
|
||||||
"tt" '(consult-theme :which-key "choose theme")
|
"bd" '(kill-this-buffer :which-key "kill buffer")
|
||||||
"ff" '(find-file :which-key "find file")
|
"bi" '(ibuffer :which-key "ibuffer")
|
||||||
"fb" '((find-file ~/org/bibles/) :which-key "find bible book")
|
"tt" '(consult-theme :which-key "choose theme")
|
||||||
"fr" '(consult-recent-file :which-key "recent file")
|
"ff" '(find-file :which-key "find file")
|
||||||
"fs" '(save-buffer :which-key "save")
|
"fb" '((find-file ~/org/bibles/) :which-key "find bible book")
|
||||||
"hf" '(helpful-callable :which-key "describe-function")
|
"fr" '(consult-recent-file :which-key "recent file")
|
||||||
"hv" '(helpful-variable :which-key "describe-variable")
|
"fs" '(save-buffer :which-key "save")
|
||||||
"hk" '(helpful-key :which-key "describe-key")
|
"hf" '(helpful-callable :which-key "describe-function")
|
||||||
"hi" '(info :which-key "info manual")
|
"hv" '(helpful-variable :which-key "describe-variable")
|
||||||
"ss" '(consult-line :which-key "consult search")
|
"hk" '(helpful-key :which-key "describe-key")
|
||||||
"ww" '(other-window :which-key "other window")
|
"hi" '(info :which-key "info manual")
|
||||||
"wd" '(delete-window :which-key "other window")
|
"ss" '(consult-line :which-key "consult search")
|
||||||
)
|
"ww" '(other-window :which-key "other window")
|
||||||
|
"wd" '(delete-window :which-key "other window")
|
||||||
|
)
|
||||||
(general-def 'minibuffer-local-map
|
(general-def 'minibuffer-local-map
|
||||||
"C-v" 'evil-paste-after))
|
"C-v" 'evil-paste-after))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -464,6 +466,8 @@ Consult has a lot of nice functions like Ivy's Counsel functions (enhanced searc
|
||||||
(setq consult-narrow-key "<")
|
(setq consult-narrow-key "<")
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"si" 'consult-imenu
|
"si" 'consult-imenu
|
||||||
"so" 'consult-outline))
|
"so" 'consult-outline))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -539,6 +543,8 @@ I do a lot of docker management so having yaml is necessary
|
||||||
:straight nil
|
:straight nil
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"od" '(dired-jump :which-key "open dired here"))
|
"od" '(dired-jump :which-key "open dired here"))
|
||||||
(general-def 'normal dired-mode-map
|
(general-def 'normal dired-mode-map
|
||||||
"q" 'kill-this-buffer))
|
"q" 'kill-this-buffer))
|
||||||
|
@ -719,6 +725,8 @@ Part of this config includes some special capture templates for my work as a you
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"o a" 'org-agenda
|
"o a" 'org-agenda
|
||||||
"c" 'org-capture)
|
"c" 'org-capture)
|
||||||
('normal org-agenda-mode-map
|
('normal org-agenda-mode-map
|
||||||
|
@ -831,6 +839,8 @@ We also need to setup some capture templates to use some specific setups with my
|
||||||
:head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
|
:head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
: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))
|
||||||
|
|
||||||
|
@ -1154,6 +1164,8 @@ If on a:
|
||||||
(mu4e t)
|
(mu4e t)
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"om" 'mu4e))
|
"om" 'mu4e))
|
||||||
|
|
||||||
(use-package org-mime
|
(use-package org-mime
|
||||||
|
@ -1189,6 +1201,8 @@ Let's add org-msg to write emails in org-mode
|
||||||
)))
|
)))
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"oc" 'chris/calfw-calendar-open)
|
"oc" 'chris/calfw-calendar-open)
|
||||||
(general-def cfw:calendar-mode-map
|
(general-def cfw:calendar-mode-map
|
||||||
"q" 'kill-this-buffer
|
"q" 'kill-this-buffer
|
||||||
|
@ -1217,7 +1231,10 @@ Use magit, because why wouldn't you? duh!
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:commands (magit-status magit-get-current-branch)
|
:commands (magit-status magit-get-current-branch)
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys "g g" 'magit-status)
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
|
"g g" 'magit-status)
|
||||||
:custom
|
:custom
|
||||||
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
|
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -1307,6 +1324,8 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"oe" 'eshell)
|
"oe" 'eshell)
|
||||||
(general-def '(normal insert) eshell-mode-map
|
(general-def '(normal insert) eshell-mode-map
|
||||||
"C-d" 'kill-this-buffer))
|
"C-d" 'kill-this-buffer))
|
||||||
|
@ -1338,32 +1357,95 @@ Let's use pdf-tools for a lot better interaction with pdfs.
|
||||||
'(("\\*e?shell\\*"
|
'(("\\*e?shell\\*"
|
||||||
(display-buffer-in-side-window)
|
(display-buffer-in-side-window)
|
||||||
(window-width . 0.4)
|
(window-width . 0.4)
|
||||||
(side . right))))
|
(side . right))
|
||||||
|
("*Bongo-Elfeed Queue*"
|
||||||
|
(display-buffer-in-side-window)
|
||||||
|
(window-height . 0.25)
|
||||||
|
(side . bottom))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Elfeed
|
** Elfeed
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package elfeed
|
(use-package elfeed
|
||||||
:commands (elfeed)
|
:commands (elfeed)
|
||||||
|
:config
|
||||||
|
(defvar chris/elfeed-bongo-playlist "*Bongo-Elfeed Queue*"
|
||||||
|
"Name of the Elfeed+Bongo multimedia playlist.")
|
||||||
|
|
||||||
|
(defun chris/elfeed-bongo-insert-item ()
|
||||||
|
"Insert `elfeed' multimedia links in `bongo' playlist buffer.
|
||||||
|
|
||||||
|
The playlist buffer has a unique name so that it will never
|
||||||
|
interfere with the default `bongo-playlist-buffer'."
|
||||||
|
(interactive)
|
||||||
|
(let* ((entry (elfeed-search-selected :ignore-region))
|
||||||
|
(link (elfeed-entry-link entry))
|
||||||
|
(enclosure (elt (car (elfeed-entry-enclosures entry)) 0))
|
||||||
|
(url (if (string-prefix-p "https://thumbnails" enclosure)
|
||||||
|
link
|
||||||
|
enclosure))
|
||||||
|
(title (elfeed-entry-title entry))
|
||||||
|
(bongo-pl chris/elfeed-bongo-playlist)
|
||||||
|
(buffer (get-buffer-create bongo-pl)))
|
||||||
|
(message "link is %s" link)
|
||||||
|
(message "enclosure is %s" enclosure)
|
||||||
|
(message "url is %s" url)
|
||||||
|
(message "title is %s" title)
|
||||||
|
(elfeed-search-untag-all-unread)
|
||||||
|
(unless (bongo-playlist-buffer)
|
||||||
|
(bongo-playlist-buffer))
|
||||||
|
(display-buffer buffer)
|
||||||
|
(with-current-buffer buffer
|
||||||
|
(when (not (bongo-playlist-buffer-p))
|
||||||
|
(bongo-playlist-mode)
|
||||||
|
(setq-local bongo-library-buffer (get-buffer "*elfeed-search*"))
|
||||||
|
(setq-local bongo-enabled-backends '(mpv))
|
||||||
|
(bongo-progressive-playback-mode))
|
||||||
|
(goto-char (point-max))
|
||||||
|
(bongo-insert-uri url (format "%s ==> %s" title url))
|
||||||
|
(let ((inhibit-read-only t))
|
||||||
|
(delete-duplicate-lines (point-min) (point-max)))
|
||||||
|
(bongo-recenter))
|
||||||
|
(message "Enqueued %s “%s” in %s"
|
||||||
|
(if enclosure "podcast" "video")
|
||||||
|
(propertize title 'face 'italic)
|
||||||
|
(propertize bongo-pl 'face 'bold))))
|
||||||
|
|
||||||
|
(defun chris/elfeed-bongo-switch-to-playlist ()
|
||||||
|
(interactive)
|
||||||
|
(let* ((bongo-pl chris/elfeed-bongo-playlist)
|
||||||
|
(buffer (get-buffer bongo-pl)))
|
||||||
|
(if buffer
|
||||||
|
(switch-to-buffer buffer)
|
||||||
|
(message "No `bongo' playlist is associated with `elfeed'."))))
|
||||||
|
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
"of" 'elfeed))
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
|
"of" 'elfeed)
|
||||||
|
|
||||||
|
(general-def 'normal elfeed-search-mode-map
|
||||||
|
"v" 'chris/elfeed-bongo-insert-item
|
||||||
|
"h" 'chris/elfeed-bongo-switch-to-playlist))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package elfeed-org
|
(use-package elfeed-org
|
||||||
:after elfeed
|
:after elfeed
|
||||||
:config
|
:config
|
||||||
(setq rmh-elfeed-org-files (list "~/org/elfeed.org")))
|
(setq rmh-elfeed-org-files (list "~/org/elfeed.org"))
|
||||||
|
(elfeed-org)
|
||||||
|
(elfeed-update))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Bongo
|
** Bongo
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package bongo
|
(use-package bongo
|
||||||
:commands (bongo)
|
:commands (bongo bongo-playlist-buffer)
|
||||||
:config
|
:config
|
||||||
(define-bongo-backend mpv
|
(define-bongo-backend mpv
|
||||||
;; :constructor 'bongo-start-mpv-player
|
|
||||||
:program-name 'mpv
|
:program-name 'mpv
|
||||||
:constructor 'bongo-start-mpv-player
|
:constructor 'bongo-start-mpv-player
|
||||||
:extra-program-arguments '("--input-ipc-server=/tmp/mpvsocket")
|
:extra-program-arguments '("--input-ipc-server=/tmp/mpvsocket")
|
||||||
|
@ -1377,7 +1459,7 @@ Let's use pdf-tools for a lot better interaction with pdfs.
|
||||||
: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 "sun-solid.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)
|
||||||
|
@ -1391,10 +1473,12 @@ Let's use pdf-tools for a lot better interaction with pdfs.
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"ob" 'bongo)
|
"ob" 'bongo)
|
||||||
(general-def 'normal bongo-playlist-mode-map
|
(general-def 'normal bongo-playlist-mode-map
|
||||||
"RET" 'bongo-dwim
|
"RET" 'bongo-play
|
||||||
"d" 'bongo-kill
|
"d" 'bongo-kill-line
|
||||||
"u" 'bongo-unmark-region
|
"u" 'bongo-unmark-region
|
||||||
"p" 'bongo-pause/resume
|
"p" 'bongo-pause/resume
|
||||||
"H" 'bongo-switch-buffers
|
"H" 'bongo-switch-buffers
|
||||||
|
@ -1406,6 +1490,7 @@ Let's use pdf-tools for a lot better interaction with pdfs.
|
||||||
We set the =gc-cons-threshold= variable to really high, now lets set it back low to make sure emacs performs properly.
|
We set the =gc-cons-threshold= variable to really high, now lets set it back low to make sure emacs performs properly.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq gc-cons-threshold 2000000)
|
(setq gc-cons-threshold 2000000)
|
||||||
|
(setq garbage-collection-messages nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Early Init
|
* Early Init
|
||||||
|
|
151
init.el
151
init.el
|
@ -164,30 +164,32 @@
|
||||||
:keymaps '(normal visual emacs)
|
:keymaps '(normal visual emacs)
|
||||||
:prefix "SPC")
|
:prefix "SPC")
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
"b" '(:ignore t :which-key "buffer")
|
:states 'normal
|
||||||
"t" '(:ignore t :which-key "toggle")
|
:keymaps 'override
|
||||||
"f" '(:ignore t :which-key "file")
|
"b" '(:ignore t :which-key "buffer")
|
||||||
"w" '(:ignore t :which-key "window")
|
"t" '(:ignore t :which-key "toggle")
|
||||||
"s" '(:ignore t :which-key "search")
|
"f" '(:ignore t :which-key "file")
|
||||||
"o" '(:ignore t :which-key "open")
|
"w" '(:ignore t :which-key "window")
|
||||||
"h" '(:ignore t :which-key "help")
|
"s" '(:ignore t :which-key "search")
|
||||||
"n" '(:ignore t :which-key "notes")
|
"o" '(:ignore t :which-key "open")
|
||||||
"bs" '(consult-buffer :which-key "buffer search")
|
"h" '(:ignore t :which-key "help")
|
||||||
"bd" '(kill-this-buffer :which-key "kill buffer")
|
"n" '(:ignore t :which-key "notes")
|
||||||
"bi" '(ibuffer :which-key "ibuffer")
|
"bs" '(consult-buffer :which-key "buffer search")
|
||||||
"tt" '(consult-theme :which-key "choose theme")
|
"bd" '(kill-this-buffer :which-key "kill buffer")
|
||||||
"ff" '(find-file :which-key "find file")
|
"bi" '(ibuffer :which-key "ibuffer")
|
||||||
"fb" '((find-file ~/org/bibles/) :which-key "find bible book")
|
"tt" '(consult-theme :which-key "choose theme")
|
||||||
"fr" '(consult-recent-file :which-key "recent file")
|
"ff" '(find-file :which-key "find file")
|
||||||
"fs" '(save-buffer :which-key "save")
|
"fb" '((find-file ~/org/bibles/) :which-key "find bible book")
|
||||||
"hf" '(helpful-callable :which-key "describe-function")
|
"fr" '(consult-recent-file :which-key "recent file")
|
||||||
"hv" '(helpful-variable :which-key "describe-variable")
|
"fs" '(save-buffer :which-key "save")
|
||||||
"hk" '(helpful-key :which-key "describe-key")
|
"hf" '(helpful-callable :which-key "describe-function")
|
||||||
"hi" '(info :which-key "info manual")
|
"hv" '(helpful-variable :which-key "describe-variable")
|
||||||
"ss" '(consult-line :which-key "consult search")
|
"hk" '(helpful-key :which-key "describe-key")
|
||||||
"ww" '(other-window :which-key "other window")
|
"hi" '(info :which-key "info manual")
|
||||||
"wd" '(delete-window :which-key "other window")
|
"ss" '(consult-line :which-key "consult search")
|
||||||
)
|
"ww" '(other-window :which-key "other window")
|
||||||
|
"wd" '(delete-window :which-key "other window")
|
||||||
|
)
|
||||||
(general-def 'minibuffer-local-map
|
(general-def 'minibuffer-local-map
|
||||||
"C-v" 'evil-paste-after))
|
"C-v" 'evil-paste-after))
|
||||||
|
|
||||||
|
@ -268,6 +270,8 @@ vertically."
|
||||||
(setq consult-narrow-key "<")
|
(setq consult-narrow-key "<")
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"si" 'consult-imenu
|
"si" 'consult-imenu
|
||||||
"so" 'consult-outline))
|
"so" 'consult-outline))
|
||||||
|
|
||||||
|
@ -313,6 +317,8 @@ vertically."
|
||||||
:straight nil
|
:straight nil
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"od" '(dired-jump :which-key "open dired here"))
|
"od" '(dired-jump :which-key "open dired here"))
|
||||||
(general-def 'normal dired-mode-map
|
(general-def 'normal dired-mode-map
|
||||||
"q" 'kill-this-buffer))
|
"q" 'kill-this-buffer))
|
||||||
|
@ -467,6 +473,8 @@ vertically."
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"o a" 'org-agenda
|
"o a" 'org-agenda
|
||||||
"c" 'org-capture)
|
"c" 'org-capture)
|
||||||
('normal org-agenda-mode-map
|
('normal org-agenda-mode-map
|
||||||
|
@ -557,6 +565,8 @@ vertically."
|
||||||
:head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
|
:head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
: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))
|
||||||
|
|
||||||
|
@ -866,6 +876,8 @@ If on a:
|
||||||
(mu4e t)
|
(mu4e t)
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"om" 'mu4e))
|
"om" 'mu4e))
|
||||||
|
|
||||||
(use-package org-mime
|
(use-package org-mime
|
||||||
|
@ -896,6 +908,8 @@ If on a:
|
||||||
)))
|
)))
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"oc" 'chris/calfw-calendar-open)
|
"oc" 'chris/calfw-calendar-open)
|
||||||
(general-def cfw:calendar-mode-map
|
(general-def cfw:calendar-mode-map
|
||||||
"q" 'kill-this-buffer
|
"q" 'kill-this-buffer
|
||||||
|
@ -912,7 +926,10 @@ If on a:
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:commands (magit-status magit-get-current-branch)
|
:commands (magit-status magit-get-current-branch)
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys "g g" 'magit-status)
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
|
"g g" 'magit-status)
|
||||||
:custom
|
:custom
|
||||||
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
|
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
|
||||||
|
|
||||||
|
@ -998,6 +1015,8 @@ If on a:
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"oe" 'eshell)
|
"oe" 'eshell)
|
||||||
(general-def '(normal insert) eshell-mode-map
|
(general-def '(normal insert) eshell-mode-map
|
||||||
"C-d" 'kill-this-buffer))
|
"C-d" 'kill-this-buffer))
|
||||||
|
@ -1019,24 +1038,87 @@ If on a:
|
||||||
'(("\\*e?shell\\*"
|
'(("\\*e?shell\\*"
|
||||||
(display-buffer-in-side-window)
|
(display-buffer-in-side-window)
|
||||||
(window-width . 0.4)
|
(window-width . 0.4)
|
||||||
(side . right))))
|
(side . right))
|
||||||
|
("*Bongo-Elfeed Queue*"
|
||||||
|
(display-buffer-in-side-window)
|
||||||
|
(window-height . 0.25)
|
||||||
|
(side . bottom))))
|
||||||
|
|
||||||
(use-package elfeed
|
(use-package elfeed
|
||||||
:commands (elfeed)
|
:commands (elfeed)
|
||||||
|
:config
|
||||||
|
(defvar chris/elfeed-bongo-playlist "*Bongo-Elfeed Queue*"
|
||||||
|
"Name of the Elfeed+Bongo multimedia playlist.")
|
||||||
|
|
||||||
|
(defun chris/elfeed-bongo-insert-item ()
|
||||||
|
"Insert `elfeed' multimedia links in `bongo' playlist buffer.
|
||||||
|
|
||||||
|
The playlist buffer has a unique name so that it will never
|
||||||
|
interfere with the default `bongo-playlist-buffer'."
|
||||||
|
(interactive)
|
||||||
|
(let* ((entry (elfeed-search-selected :ignore-region))
|
||||||
|
(link (elfeed-entry-link entry))
|
||||||
|
(enclosure (elt (car (elfeed-entry-enclosures entry)) 0))
|
||||||
|
(url (if (string-prefix-p "https://thumbnails" enclosure)
|
||||||
|
link
|
||||||
|
enclosure))
|
||||||
|
(title (elfeed-entry-title entry))
|
||||||
|
(bongo-pl chris/elfeed-bongo-playlist)
|
||||||
|
(buffer (get-buffer-create bongo-pl)))
|
||||||
|
(message "link is %s" link)
|
||||||
|
(message "enclosure is %s" enclosure)
|
||||||
|
(message "url is %s" url)
|
||||||
|
(message "title is %s" title)
|
||||||
|
(elfeed-search-untag-all-unread)
|
||||||
|
(unless (bongo-playlist-buffer)
|
||||||
|
(bongo-playlist-buffer))
|
||||||
|
(display-buffer buffer)
|
||||||
|
(with-current-buffer buffer
|
||||||
|
(when (not (bongo-playlist-buffer-p))
|
||||||
|
(bongo-playlist-mode)
|
||||||
|
(setq-local bongo-library-buffer (get-buffer "*elfeed-search*"))
|
||||||
|
(setq-local bongo-enabled-backends '(mpv))
|
||||||
|
(bongo-progressive-playback-mode))
|
||||||
|
(goto-char (point-max))
|
||||||
|
(bongo-insert-uri url (format "%s ==> %s" title url))
|
||||||
|
(let ((inhibit-read-only t))
|
||||||
|
(delete-duplicate-lines (point-min) (point-max)))
|
||||||
|
(bongo-recenter))
|
||||||
|
(message "Enqueued %s “%s” in %s"
|
||||||
|
(if enclosure "podcast" "video")
|
||||||
|
(propertize title 'face 'italic)
|
||||||
|
(propertize bongo-pl 'face 'bold))))
|
||||||
|
|
||||||
|
(defun chris/elfeed-bongo-switch-to-playlist ()
|
||||||
|
(interactive)
|
||||||
|
(let* ((bongo-pl chris/elfeed-bongo-playlist)
|
||||||
|
(buffer (get-buffer bongo-pl)))
|
||||||
|
(if buffer
|
||||||
|
(switch-to-buffer buffer)
|
||||||
|
(message "No `bongo' playlist is associated with `elfeed'."))))
|
||||||
|
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
"of" 'elfeed))
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
|
"of" 'elfeed)
|
||||||
|
|
||||||
|
(general-def 'normal elfeed-search-mode-map
|
||||||
|
"v" 'chris/elfeed-bongo-insert-item
|
||||||
|
"h" 'chris/elfeed-bongo-switch-to-playlist))
|
||||||
|
|
||||||
(use-package elfeed-org
|
(use-package elfeed-org
|
||||||
:after elfeed
|
:after elfeed
|
||||||
:config
|
:config
|
||||||
(setq rmh-elfeed-org-files (list "~/org/elfeed.org")))
|
(setq rmh-elfeed-org-files (list "~/org/elfeed.org"))
|
||||||
|
(elfeed-org)
|
||||||
|
(elfeed-update))
|
||||||
|
|
||||||
(use-package bongo
|
(use-package bongo
|
||||||
:commands (bongo)
|
:commands (bongo bongo-playlist-buffer)
|
||||||
:config
|
:config
|
||||||
(define-bongo-backend mpv
|
(define-bongo-backend mpv
|
||||||
;; :constructor 'bongo-start-mpv-player
|
|
||||||
:program-name 'mpv
|
:program-name 'mpv
|
||||||
:constructor 'bongo-start-mpv-player
|
:constructor 'bongo-start-mpv-player
|
||||||
:extra-program-arguments '("--input-ipc-server=/tmp/mpvsocket")
|
:extra-program-arguments '("--input-ipc-server=/tmp/mpvsocket")
|
||||||
|
@ -1050,7 +1132,7 @@ If on a:
|
||||||
: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 "sun-solid.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)
|
||||||
|
@ -1064,13 +1146,16 @@ If on a:
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
:states 'normal
|
||||||
|
:keymaps 'override
|
||||||
"ob" 'bongo)
|
"ob" 'bongo)
|
||||||
(general-def 'normal bongo-playlist-mode-map
|
(general-def 'normal bongo-playlist-mode-map
|
||||||
"RET" 'bongo-dwim
|
"RET" 'bongo-play
|
||||||
"d" 'bongo-kill
|
"d" 'bongo-kill-line
|
||||||
"u" 'bongo-unmark-region
|
"u" 'bongo-unmark-region
|
||||||
"p" 'bongo-pause/resume
|
"p" 'bongo-pause/resume
|
||||||
"H" 'bongo-switch-buffers
|
"H" 'bongo-switch-buffers
|
||||||
"m" 'chris/bongo-mark-line-forward))
|
"m" 'chris/bongo-mark-line-forward))
|
||||||
|
|
||||||
(setq gc-cons-threshold 2000000)
|
(setq gc-cons-threshold 2000000)
|
||||||
|
(setq garbage-collection-messages nil)
|
||||||
|
|
Loading…
Reference in a new issue