adding empv configs

This commit is contained in:
Chris Cochrun 2023-09-05 11:12:02 -05:00
parent e6e8270f3e
commit 44df17f8f4
2 changed files with 200 additions and 12 deletions

View file

@ -42,6 +42,7 @@
- [[#pdf-tools][PDF-Tools]]
- [[#epub][EPUB]]
- [[#eaf-emacs-application-framework][EAF (Emacs Application Framework)]]
- [[#empv][EMPV]]
- [[#elfeed][Elfeed]]
- [[#bongo][Bongo]]
- [[#emms][EMMS]]
@ -512,6 +513,7 @@ This evil-collection package includes a lot of other evil based things.
"m" '(:ignore t :which-key "music")
"l" '(:ignore t :which-key "lsp")
"x" '(:ignore t :which-key "guix")
"v" '(:ignore t :which-key "mpv")
"xx" '(guix :which-key "guix")
"sp" '(:ignore t :which-key "passwords")
"bs" '(consult-buffer :which-key "buffer search")
@ -709,7 +711,9 @@ Let's start by creating a self contained function of what I'd like started on ev
(toggle-truncate-lines +1)
(evil-normal-state)
(setq visual-fill-column-width 120
visual-fill-column-center-text t))
visual-fill-column-center-text t)
(if (string= org-agenda-this-buffer-name "*Org Agenda(fa:area+LEVEL=1)*")
(org-agenda-columns)))
(defun chris/org-mpv (&optional url)
(interactive)
@ -851,6 +855,17 @@ Part of this config includes some special capture templates for my work as a you
("@mean" . org-columns--summary-mean-age)
("@min" . org-columns--summary-min-age)
("est+" . org-columns--summary-estimate)))
(setq org-agenda-custom-commands
'(("w" todo "WAIT")
("fa" tags "area+LEVEL=1")
("fr" tags "resource+LEVEL=1")
("fp" tags "project+LEVEL=1")
("fA" tags "archive+LEVEL=1")
("ha" tags "abbie")
("hl" tags "luke")
("hy" tags "ty")
("hj" tags "josiah")))
(defun chris/org-columns-view ()
"Turn on org-columns overlay and turn off olivetti-mode"
@ -892,8 +907,7 @@ Part of this config includes some special capture templates for my work as a you
"c" 'org-capture
"rr" 'org-refile
"E" 'org-export-dispatch
"oa" 'org-agenda-list
"os" 'org-agenda
"oa" 'org-agenda
"gt" 'org-babel-tangle
"td" 'org-toggle-link-display
"il" 'org-insert-link
@ -1043,15 +1057,15 @@ We also need to setup some capture templates to use some specific setups with my
org-roam-capture-templates
'(("d" "default" entry "\n* %?"
:if-new (file+head "${slug}.org"
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n%a")
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n#+CATEGORY: todo\n\n%a")
:unnarrowed t)
("b" "bible" entry "\n* %?"
:if-new (file+head "${slug}.org"
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n- tags :biblestudy:%^G\n\n")
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n#+CATEGORY: bible\n- tags :biblestudy:%^G\n\n")
:unnarrowed t)
("l" "TFC Lesson" plain (file ".templates/lessontemplate.org")
:if-new (file+head "lessons/${slug}.org"
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n")
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n#+CATEGORY: lesson\n")
:unnarrowed t))
org-roam-dailies-capture-templates
'(("d" "daily" plain "%?"
@ -2598,6 +2612,10 @@ Ace link provides an avy like search for links. Upon using the keybindings prese
(display-buffer-in-side-window)
(side . right)
(window-width . 0.4))
("\\*Agenda Commands\\*"
(display-buffer-in-side-window)
(side . bottom)
(window-height . 0.30))
("\\*elfeed-entry\\*"
(display-buffer-in-side-window)
(side . bottom)
@ -2632,6 +2650,10 @@ Ace link provides an avy like search for links. Upon using the keybindings prese
(display-buffer-in-side-window)
(side . bottom)
(window-height . 0.25))
("\\*Agenda Commands\\*"
(display-buffer-in-side-window)
(side . bottom)
(window-height . 0.30))
("*gud-presenter*"
(display-buffer-in-side-window)
(side . bottom)
@ -3925,6 +3947,120 @@ Let's use pdf-tools for a lot better interaction with pdfs.
(eaf-browser-enable-adblocker t))
#+end_src
** EMPV
:PROPERTIES:
:ID: 20230905T060329.179745
:END:
With empv we can perhaps control mpv much more fine grainly and even search youtube videos easier through emacs. Let's set it up.
#+begin_src emacs-lisp
(use-package empv
:config
(setq empv-invidious-instance "https://vid.puffyan.us/api/v1"
empv-video-file-extensions '("mkv" "mp4" "avi" "mov" "webm")
empv-mpv-args '("--no-terminal" "--idle" "--input-ipc-server=/tmp/empv-socket"))
(empv-embark-initialize-extra-actions)
(general-auto-unbind-keys)
(add-hook 'empv-resultes-mode-hook #'evil-normal-state)
(defun chris/empv-yt-dlp ()
"Download the current video and and play it"
(interactive)
(async-shell-command (concat "yt-dlp" " \"" (empv-youtube-results--current-video-url) "\"")))
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"vo" 'empv-play-or-enqueue
"vt" 'empv-toggle
"vv" 'empv-play-video
"vx" 'empv-chapter-select
"vy" 'empv-youtube-tabulated)
(general-def
:states 'normal
:keymaps 'empv-youtube-results-mode-map
"q" 'quit-window
"RET" 'empv-youtube-results-play-or-enqueue-current
"i" 'empv-youtube-results-inspect
"d" 'chris/empv-yt-dlp))
#+end_src
I need to update the new normal mode pieces to this...
Value
- negative-argument
0 nil
1 digit-argument
2 digit-argument
3 digit-argument
4 digit-argument
5 digit-argument
6 digit-argument
7 digit-argument
8 digit-argument
9 digit-argument
< beginning-of-buffer
<follow-link> mouse-face
<keymap> C-M-i backward-button
<keymap> TAB forward-button
<mouse-2> mouse-select-window
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> ignore
<normal-state> S tabulated-list-sort
<normal-state> Z Q evil-quit
<normal-state> Z Z quit-window
<normal-state> g h tabulated-list-previous-column
<normal-state> g l tabulated-list-next-column
<normal-state> q quit-window
<normal-state> q quit-window
<normal-state> { tabulated-list-narrow-current-column
<normal-state> } tabulated-list-widen-current-column
> end-of-buffer
? nil
DEL scroll-down-command
M-<left> tabulated-list-previous-column
M-<right> tabulated-list-next-column
P empv-youtube-results-play-current
RET empv-youtube-results-play-or-enqueue-current
S tabulated-list-sort
S-SPC scroll-down-command
SPC scroll-up-command
SPC..~ undefined
Y empv-youtube-results-copy-current
a empv-youtube-results-enqueue-current
c empv-youtube-results-show-comments
g r revert-buffer
h nil
i empv-youtube-results-inspect
j next-line
k previous-line
n nil
p nil
q quit-window
{ tabulated-list-narrow-current-column
} tabulated-list-widen-current-column
** Elfeed
#+begin_src emacs-lisp
(use-package elfeed

64
init.el
View file

@ -258,6 +258,7 @@
"m" '(:ignore t :which-key "music")
"l" '(:ignore t :which-key "lsp")
"x" '(:ignore t :which-key "guix")
"v" '(:ignore t :which-key "mpv")
"xx" '(guix :which-key "guix")
"sp" '(:ignore t :which-key "passwords")
"bs" '(consult-buffer :which-key "buffer search")
@ -445,7 +446,9 @@
(toggle-truncate-lines +1)
(evil-normal-state)
(setq visual-fill-column-width 120
visual-fill-column-center-text t))
visual-fill-column-center-text t)
(if (string= org-agenda-this-buffer-name "*Org Agenda(fa:area+LEVEL=1)*")
(org-agenda-columns)))
(defun chris/org-mpv (&optional url)
(interactive)
@ -582,6 +585,17 @@ much faster. The hope is to also make this a faster version of imenu."
("@mean" . org-columns--summary-mean-age)
("@min" . org-columns--summary-min-age)
("est+" . org-columns--summary-estimate)))
(setq org-agenda-custom-commands
'(("w" todo "WAIT")
("fa" tags "area+LEVEL=1")
("fr" tags "resource+LEVEL=1")
("fp" tags "project+LEVEL=1")
("fA" tags "archive+LEVEL=1")
("ha" tags "abbie")
("hl" tags "luke")
("hy" tags "ty")
("hj" tags "josiah")))
(defun chris/org-columns-view ()
"Turn on org-columns overlay and turn off olivetti-mode"
@ -623,8 +637,7 @@ much faster. The hope is to also make this a faster version of imenu."
"c" 'org-capture
"rr" 'org-refile
"E" 'org-export-dispatch
"oa" 'org-agenda-list
"os" 'org-agenda
"oa" 'org-agenda
"gt" 'org-babel-tangle
"td" 'org-toggle-link-display
"il" 'org-insert-link
@ -747,15 +760,15 @@ much faster. The hope is to also make this a faster version of imenu."
org-roam-capture-templates
'(("d" "default" entry "\n* %?"
:if-new (file+head "${slug}.org"
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n%a")
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n#+CATEGORY: todo\n\n%a")
:unnarrowed t)
("b" "bible" entry "\n* %?"
:if-new (file+head "${slug}.org"
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n- tags :biblestudy:%^G\n\n")
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n#+CATEGORY: bible\n- tags :biblestudy:%^G\n\n")
:unnarrowed t)
("l" "TFC Lesson" plain (file ".templates/lessontemplate.org")
:if-new (file+head "lessons/${slug}.org"
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n")
"#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n#+CATEGORY: lesson\n")
:unnarrowed t))
org-roam-dailies-capture-templates
'(("d" "daily" plain "%?"
@ -1925,6 +1938,10 @@ targets."
(display-buffer-in-side-window)
(side . right)
(window-width . 0.4))
("\\*Agenda Commands\\*"
(display-buffer-in-side-window)
(side . bottom)
(window-height . 0.30))
("\\*elfeed-entry\\*"
(display-buffer-in-side-window)
(side . bottom)
@ -1959,6 +1976,10 @@ targets."
(display-buffer-in-side-window)
(side . bottom)
(window-height . 0.25))
("\\*Agenda Commands\\*"
(display-buffer-in-side-window)
(side . bottom)
(window-height . 0.30))
("*gud-presenter*"
(display-buffer-in-side-window)
(side . bottom)
@ -2853,6 +2874,37 @@ targets."
(add-hook 'nov-mode-hook 'chris/setup-nov-mode))
(use-package empv
:config
(setq empv-invidious-instance "https://vid.puffyan.us/api/v1"
empv-video-file-extensions '("mkv" "mp4" "avi" "mov" "webm")
empv-mpv-args '("--no-terminal" "--idle" "--input-ipc-server=/tmp/empv-socket"))
(empv-embark-initialize-extra-actions)
(general-auto-unbind-keys)
(add-hook 'empv-resultes-mode-hook #'evil-normal-state)
(defun chris/empv-yt-dlp ()
"Download the current video and and play it"
(interactive)
(async-shell-command (concat "yt-dlp" " \"" (empv-youtube-results--current-video-url) "\"")))
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"vo" 'empv-play-or-enqueue
"vt" 'empv-toggle
"vv" 'empv-play-video
"vx" 'empv-chapter-select
"vy" 'empv-youtube-tabulated)
(general-def
:states 'normal
:keymaps 'empv-youtube-results-mode-map
"q" 'quit-window
"RET" 'empv-youtube-results-play-or-enqueue-current
"i" 'empv-youtube-results-inspect
"d" 'chris/empv-yt-dlp))
(use-package elfeed
:commands (elfeed)
:config