adding some tweaks and better denote stuffs

This commit is contained in:
Chris Cochrun 2024-01-03 10:33:40 -06:00
parent e8048fa548
commit 3106279e05
2 changed files with 68 additions and 24 deletions

View file

@ -403,7 +403,7 @@ Let's make parens and other delimiters easier to tell apart by making nested one
*** Searching *** Searching
Let's make xref use ripgrep instead of grep for speed. Let's make xref use ripgrep instead of grep for speed.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq xref-search-program "ripgrep") (setq xref-search-program 'ripgrep)
#+end_src #+end_src
** Fix NixOS ** Fix NixOS
@ -931,9 +931,13 @@ Part of this config includes some special capture templates for my work as a you
'(("t" "Personal todo" entry '(("t" "Personal todo" entry
(file "~/docs/todo/todo.org") (file "~/docs/todo/todo.org")
(file ".templates/tasks.org") :prepend t) (file ".templates/tasks.org") :prepend t)
("n" "Personal notes" entry ("n" "Personal notes" plain
(file "todo/notes.org") (file denote-last-path)
"* %u %?\n%i\n%a" :prepend t) #'denote-org-capture
:no-save t
:immediate-finish nil
:kill-buffer t
:jump-to-captured t)
("p" "TFC Plan" entry ("p" "TFC Plan" entry
(function chris/denote-capture-lesson-file) (function chris/denote-capture-lesson-file)
(file ".templates/tfcplantemplate.org") (file ".templates/tfcplantemplate.org")
@ -985,7 +989,7 @@ Part of this config includes some special capture templates for my work as a you
(setq org-imenu-depth 4 (setq org-imenu-depth 4
org-odt-styles-file "/home/chris/docs/style.odt" org-odt-styles-file "/home/chris/docs/style.odt"
org-export-with-toc nil org-export-with-toc nil
org-export-with-author nil org-export-with-author t
org-export-with-section-numbers nil org-export-with-section-numbers nil
org-todo-keywords org-todo-keywords
'((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)")
@ -1021,6 +1025,7 @@ Part of this config includes some special capture templates for my work as a you
("fa" tags "area+LEVEL=1") ("fa" tags "area+LEVEL=1")
("fr" tags "resource+LEVEL=1") ("fr" tags "resource+LEVEL=1")
("fp" . "Projects") ("fp" . "Projects")
("fpp" "All projects" tags "project+LEVEL=1")
("fpt" "All TFC projects" tags "projecttfc+LEVEL=1") ("fpt" "All TFC projects" tags "projecttfc+LEVEL=1")
("fpd" "All Dev projects" tags "projectdev") ("fpd" "All Dev projects" tags "projectdev")
("fA" tags "archive+LEVEL=1") ("fA" tags "archive+LEVEL=1")
@ -1062,12 +1067,7 @@ Part of this config includes some special capture templates for my work as a you
(org-agenda-list))) (org-agenda-list)))
(setq org-latex-packages-alist '(("margin=2cm" "geometry" nil))) (setq org-latex-packages-alist '(("margin=2cm" "geometry" nil)))
(add-to-list 'org-latex-classes '("lesson" "\\documentclass[10pt]{article}" (setq org-latex-title-command "\\maketitle\\vspace{-4em}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(setq org-publish-project-alist (setq org-publish-project-alist
`(("home" `(("home"
@ -4464,6 +4464,27 @@ With empv we can perhaps control mpv much more fine grainly and even search yout
(empv-play file)) (empv-play file))
(message url))) (message url)))
(defun chris/empv-yt-dlp-jellyfin ()
"Grabs the current video at point and downloads it to my jellyfin server"
(interactive)
(let* ((server "jelly.cochrun.xyz")
(item (empv-youtube-results--current-item))
(video-id (alist-get 'videoId item))
(playlist-id (alist-get 'playlistId item))
(title (alist-get 'title item))
(location (completing-read "location: " '("dev" "house" "ministry" "misc")))
(url (format
"https://youtube.com/%s=%s"
(if video-id "watch?v" "playlist?list")
(or video-id playlist-id))))
(async-shell-command (concat
"ssh " server " \"" "yt-dlp"
" -o '/storage/media/media/chris/extras/yt/"
location
"/%(title)s.%(ext)s'"
" '" url "'" "\""))
(message (format "%s is downloading to the %s folder on jellyfin" url location))))
(defun chris/empv-org-play-link (&optional link) (defun chris/empv-org-play-link (&optional link)
"Play link in empv from either supplied link or link at point in org-mode" "Play link in empv from either supplied link or link at point in org-mode"
(interactive) (interactive)
@ -4490,7 +4511,8 @@ With empv we can perhaps control mpv much more fine grainly and even search yout
"q" 'quit-window "q" 'quit-window
"RET" 'empv-youtube-results-play-or-enqueue-current "RET" 'empv-youtube-results-play-or-enqueue-current
"i" 'empv-youtube-results-inspect "i" 'empv-youtube-results-inspect
"d" 'chris/empv-yt-dlp)) "d" 'chris/empv-yt-dlp
"D" 'chris/empv-yt-dlp-jellyfin))
#+end_src #+end_src
I need to update the new normal mode pieces to this... I need to update the new normal mode pieces to this...

46
init.el
View file

@ -197,7 +197,7 @@
(eval (mini-echo-mode 0) (doom-modeline-mode 1)) (eval (mini-echo-mode 0) (doom-modeline-mode 1))
(eval (doom-modeline-mode 0) (mini-echo-mode 1))))) (eval (doom-modeline-mode 0) (mini-echo-mode 1)))))
(setq xref-search-program "ripgrep") (setq xref-search-program 'ripgrep)
(setenv "WAYLAND_DISPLAY" (if (string= (getenv "XDG_CURRENT_DESKTOP") "Hyprland") (setenv "WAYLAND_DISPLAY" (if (string= (getenv "XDG_CURRENT_DESKTOP") "Hyprland")
"wayland-1" "wayland-1"
@ -620,9 +620,13 @@ much faster. The hope is to also make this a faster version of imenu."
'(("t" "Personal todo" entry '(("t" "Personal todo" entry
(file "~/docs/todo/todo.org") (file "~/docs/todo/todo.org")
(file ".templates/tasks.org") :prepend t) (file ".templates/tasks.org") :prepend t)
("n" "Personal notes" entry ("n" "Personal notes" plain
(file "todo/notes.org") (file denote-last-path)
"* %u %?\n%i\n%a" :prepend t) #'denote-org-capture
:no-save t
:immediate-finish nil
:kill-buffer t
:jump-to-captured t)
("p" "TFC Plan" entry ("p" "TFC Plan" entry
(function chris/denote-capture-lesson-file) (function chris/denote-capture-lesson-file)
(file ".templates/tfcplantemplate.org") (file ".templates/tfcplantemplate.org")
@ -674,7 +678,7 @@ much faster. The hope is to also make this a faster version of imenu."
(setq org-imenu-depth 4 (setq org-imenu-depth 4
org-odt-styles-file "/home/chris/docs/style.odt" org-odt-styles-file "/home/chris/docs/style.odt"
org-export-with-toc nil org-export-with-toc nil
org-export-with-author nil org-export-with-author t
org-export-with-section-numbers nil org-export-with-section-numbers nil
org-todo-keywords org-todo-keywords
'((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)")
@ -710,6 +714,7 @@ much faster. The hope is to also make this a faster version of imenu."
("fa" tags "area+LEVEL=1") ("fa" tags "area+LEVEL=1")
("fr" tags "resource+LEVEL=1") ("fr" tags "resource+LEVEL=1")
("fp" . "Projects") ("fp" . "Projects")
("fpp" "All projects" tags "project+LEVEL=1")
("fpt" "All TFC projects" tags "projecttfc+LEVEL=1") ("fpt" "All TFC projects" tags "projecttfc+LEVEL=1")
("fpd" "All Dev projects" tags "projectdev") ("fpd" "All Dev projects" tags "projectdev")
("fA" tags "archive+LEVEL=1") ("fA" tags "archive+LEVEL=1")
@ -751,12 +756,7 @@ much faster. The hope is to also make this a faster version of imenu."
(org-agenda-list))) (org-agenda-list)))
(setq org-latex-packages-alist '(("margin=2cm" "geometry" nil))) (setq org-latex-packages-alist '(("margin=2cm" "geometry" nil)))
(add-to-list 'org-latex-classes '("lesson" "\\documentclass[10pt]{article}" (setq org-latex-title-command "\\maketitle\\vspace{-4em}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(setq org-publish-project-alist (setq org-publish-project-alist
`(("home" `(("home"
@ -3200,6 +3200,27 @@ targets."
(empv-play file)) (empv-play file))
(message url))) (message url)))
(defun chris/empv-yt-dlp-jellyfin ()
"Grabs the current video at point and downloads it to my jellyfin server"
(interactive)
(let* ((server "jelly.cochrun.xyz")
(item (empv-youtube-results--current-item))
(video-id (alist-get 'videoId item))
(playlist-id (alist-get 'playlistId item))
(title (alist-get 'title item))
(location (completing-read "location: " '("dev" "house" "ministry" "misc")))
(url (format
"https://youtube.com/%s=%s"
(if video-id "watch?v" "playlist?list")
(or video-id playlist-id))))
(async-shell-command (concat
"ssh " server " \"" "yt-dlp"
" -o '/storage/media/media/chris/extras/yt/"
location
"/%(title)s.%(ext)s'"
" '" url "'" "\""))
(message (format "%s is downloading to the %s folder on jellyfin" url location))))
(defun chris/empv-org-play-link (&optional link) (defun chris/empv-org-play-link (&optional link)
"Play link in empv from either supplied link or link at point in org-mode" "Play link in empv from either supplied link or link at point in org-mode"
(interactive) (interactive)
@ -3226,7 +3247,8 @@ targets."
"q" 'quit-window "q" 'quit-window
"RET" 'empv-youtube-results-play-or-enqueue-current "RET" 'empv-youtube-results-play-or-enqueue-current
"i" 'empv-youtube-results-inspect "i" 'empv-youtube-results-inspect
"d" 'chris/empv-yt-dlp)) "d" 'chris/empv-yt-dlp
"D" 'chris/empv-yt-dlp-jellyfin))
(use-package elfeed (use-package elfeed
:commands (elfeed) :commands (elfeed)