From fe794975246f1910bfdc494e266817d33fd199df Mon Sep 17 00:00:00 2001 From: Rahguzar Date: Sun, 10 Mar 2024 12:09:25 +0100 Subject: Optionally show status of mpv process on modeline --- yeetube.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'yeetube.el') diff --git a/yeetube.el b/yeetube.el index bb51a25..1b7bd34 100644 --- a/yeetube.el +++ b/yeetube.el @@ -210,9 +210,11 @@ Keywords: (defun yeetube-play () "Play video at point in *yeetube* buffer." (interactive) - (let ((video-url (yeetube-get-url)) - (video-title (yeetube-get :title))) - (funcall yeetube-play-function video-url) + (let* ((video-url (yeetube-get-url)) + (video-title (yeetube-get :title)) + (proc (funcall yeetube-play-function video-url))) + (when (processp proc) + (process-put proc :now-playing video-title)) (push (list :url video-url :title video-title) yeetube-history) (message "Playing: %s" video-title))) @@ -651,6 +653,7 @@ A and B are vectors." yeetube-content) tabulated-list-sort-key (cons yeetube-default-sort-column yeetube-default-sort-ascending)) + (setq-local yeetube-mpv-show-status t) (display-line-numbers-mode 0) (tabulated-list-init-header) (tabulated-list-print)) -- cgit v1.2.3