diff --git a/README.org b/README.org index adfdad9e..6de0c7fc 100644 --- a/README.org +++ b/README.org @@ -403,7 +403,7 @@ Let's make parens and other delimiters easier to tell apart by making nested one *** Searching Let's make xref use ripgrep instead of grep for speed. #+begin_src emacs-lisp -(setq xref-search-program "ripgrep") +(setq xref-search-program 'ripgrep) #+end_src ** 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 (file "~/docs/todo/todo.org") (file ".templates/tasks.org") :prepend t) - ("n" "Personal notes" entry - (file "todo/notes.org") - "* %u %?\n%i\n%a" :prepend t) + ("n" "Personal notes" plain + (file denote-last-path) + #'denote-org-capture + :no-save t + :immediate-finish nil + :kill-buffer t + :jump-to-captured t) ("p" "TFC Plan" entry (function chris/denote-capture-lesson-file) (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 org-odt-styles-file "/home/chris/docs/style.odt" org-export-with-toc nil - org-export-with-author nil + org-export-with-author t org-export-with-section-numbers nil org-todo-keywords '((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") ("fr" tags "resource+LEVEL=1") ("fp" . "Projects") + ("fpp" "All projects" tags "project+LEVEL=1") ("fpt" "All TFC projects" tags "projecttfc+LEVEL=1") ("fpd" "All Dev projects" tags "projectdev") ("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))) (setq org-latex-packages-alist '(("margin=2cm" "geometry" nil))) - (add-to-list 'org-latex-classes '("lesson" "\\documentclass[10pt]{article}" - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) + (setq org-latex-title-command "\\maketitle\\vspace{-4em}") (setq org-publish-project-alist `(("home" @@ -4464,6 +4464,27 @@ With empv we can perhaps control mpv much more fine grainly and even search yout (empv-play file)) (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) "Play link in empv from either supplied link or link at point in org-mode" (interactive) @@ -4490,7 +4511,8 @@ With empv we can perhaps control mpv much more fine grainly and even search yout "q" 'quit-window "RET" 'empv-youtube-results-play-or-enqueue-current "i" 'empv-youtube-results-inspect - "d" 'chris/empv-yt-dlp)) + "d" 'chris/empv-yt-dlp + "D" 'chris/empv-yt-dlp-jellyfin)) #+end_src I need to update the new normal mode pieces to this... diff --git a/init.el b/init.el index 455ed96e..f9fd785f 100644 --- a/init.el +++ b/init.el @@ -197,7 +197,7 @@ (eval (mini-echo-mode 0) (doom-modeline-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") "wayland-1" @@ -620,9 +620,13 @@ much faster. The hope is to also make this a faster version of imenu." '(("t" "Personal todo" entry (file "~/docs/todo/todo.org") (file ".templates/tasks.org") :prepend t) - ("n" "Personal notes" entry - (file "todo/notes.org") - "* %u %?\n%i\n%a" :prepend t) + ("n" "Personal notes" plain + (file denote-last-path) + #'denote-org-capture + :no-save t + :immediate-finish nil + :kill-buffer t + :jump-to-captured t) ("p" "TFC Plan" entry (function chris/denote-capture-lesson-file) (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 org-odt-styles-file "/home/chris/docs/style.odt" org-export-with-toc nil - org-export-with-author nil + org-export-with-author t org-export-with-section-numbers nil org-todo-keywords '((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") ("fr" tags "resource+LEVEL=1") ("fp" . "Projects") + ("fpp" "All projects" tags "project+LEVEL=1") ("fpt" "All TFC projects" tags "projecttfc+LEVEL=1") ("fpd" "All Dev projects" tags "projectdev") ("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))) (setq org-latex-packages-alist '(("margin=2cm" "geometry" nil))) - (add-to-list 'org-latex-classes '("lesson" "\\documentclass[10pt]{article}" - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) + (setq org-latex-title-command "\\maketitle\\vspace{-4em}") (setq org-publish-project-alist `(("home" @@ -3200,6 +3200,27 @@ targets." (empv-play file)) (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) "Play link in empv from either supplied link or link at point in org-mode" (interactive) @@ -3226,7 +3247,8 @@ targets." "q" 'quit-window "RET" 'empv-youtube-results-play-or-enqueue-current "i" 'empv-youtube-results-inspect - "d" 'chris/empv-yt-dlp)) + "d" 'chris/empv-yt-dlp + "D" 'chris/empv-yt-dlp-jellyfin)) (use-package elfeed :commands (elfeed)