diff --git a/README.org b/README.org index ea761403..5d0c631c 100644 --- a/README.org +++ b/README.org @@ -97,11 +97,11 @@ Let's start by making some basic ui changes like turning off the scrollbar, tool #+begin_src emacs-lisp (setq inhibit-startup-message t) -(scroll-bar-mode -1) +(setq default-frame-alist '((undecorated . t))) (tool-bar-mode -1) (tooltip-mode -1) (set-fringe-mode +1) - +(scroll-bar-mode -1) (menu-bar-mode -1) (blink-cursor-mode -1) (column-number-mode +1) @@ -5082,14 +5082,14 @@ With empv we can perhaps control mpv much more fine grainly and even search yout (let* ((item (when (not file) (empv-youtube-results--current-item))) (video-id (when (not file) (alist-get 'videoId item))) (playlist-id (when (not file) (alist-get 'playlistId item))) - (title (if file (shell-command-to-string - (format "yt-dlp --no-warnings --quiet --get-title %s" file)) - (alist-get 'title item))) - (url (if file file + (url (if file (progn (message file) (string-replace "inv.cochrun.xyz" "youtube.com" file)) (format "https://youtube.com/%s=%s" (if video-id "watch?v" "playlist?list") (or video-id playlist-id)))) + (title (if file (shell-command-to-string + (format "yt-dlp --no-warnings --quiet --get-title %s" url)) + (alist-get 'title item))) (output-buffer (generate-new-buffer "*yt-dlp*")) (process (progn (message "Starting to download %s at %s" title url) @@ -5104,8 +5104,9 @@ With empv we can perhaps control mpv much more fine grainly and even search yout "--sponsorblock-remove=sponsor,intro,outro")) (get-buffer-process output-buffer))) (enqueue `(lambda (process event) - (message "running %s because %s" process event) - (empv-enqueue (concat "/home/chris/vids/" (string-trim ,title) ".mp4"))))) + (progn (message "running %s because %s" process event) + (empv-enqueue (concat "/home/chris/vids/" (string-trim ,title) ".mp4")) + (kill-buffer output-buffer))))) (message url) (if (process-live-p process) (set-process-sentinel diff --git a/init.el b/init.el index 37c8db1c..557d1c31 100644 --- a/init.el +++ b/init.el @@ -9,11 +9,11 @@ (setq inhibit-startup-message t) -(scroll-bar-mode -1) +(setq default-frame-alist '((undecorated . t))) (tool-bar-mode -1) (tooltip-mode -1) (set-fringe-mode +1) - +(scroll-bar-mode -1) (menu-bar-mode -1) (blink-cursor-mode -1) (column-number-mode +1) @@ -3726,14 +3726,14 @@ targets." (let* ((item (when (not file) (empv-youtube-results--current-item))) (video-id (when (not file) (alist-get 'videoId item))) (playlist-id (when (not file) (alist-get 'playlistId item))) - (title (if file (shell-command-to-string - (format "yt-dlp --no-warnings --quiet --get-title %s" file)) - (alist-get 'title item))) - (url (if file file + (url (if file (progn (message file) (string-replace "inv.cochrun.xyz" "youtube.com" file)) (format "https://youtube.com/%s=%s" (if video-id "watch?v" "playlist?list") (or video-id playlist-id)))) + (title (if file (shell-command-to-string + (format "yt-dlp --no-warnings --quiet --get-title %s" url)) + (alist-get 'title item))) (output-buffer (generate-new-buffer "*yt-dlp*")) (process (progn (message "Starting to download %s at %s" title url) @@ -3748,8 +3748,9 @@ targets." "--sponsorblock-remove=sponsor,intro,outro")) (get-buffer-process output-buffer))) (enqueue `(lambda (process event) - (message "running %s because %s" process event) - (empv-enqueue (concat "/home/chris/vids/" (string-trim ,title) ".mp4"))))) + (progn (message "running %s because %s" process event) + (empv-enqueue (concat "/home/chris/vids/" (string-trim ,title) ".mp4")) + (kill-buffer output-buffer))))) (message url) (if (process-live-p process) (set-process-sentinel