commit 9eecf62893405047159f05587053f8a5b5a9382a parent 01f2badbc65a0985ca4292fa196e9afcbf9e9b0f Author: Tomas Hlavaty <tom@logand.com> Date: Fri, 5 Jan 2024 20:08:57 +0100 add framebuffer-mocp Diffstat:
M | emacs-framebuffer.el | | | 10 | +++++++++- |
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el @@ -677,13 +677,21 @@ (if position (framebuffer-hh:mm:ss position) "") (shell-quote-argument (expand-file-name filename))))) +(defun framebuffer-mocp (filename &optional position) + (suspend-emacs + (format "mocp -p %s%s %s; fg" + (if position "-k " "") + (or position "") + (shell-quote-argument (expand-file-name filename))))) + (defun framebuffer-fbview () (interactive) (let* ((filename (dired-file-name-at-point)) (x (file-name-extension filename))) (cond ((member x '("pdf" "PDF")) (framebuffer-fbpdf filename)) - ((member x '("mkv" "MKV" "mp4" "MP4" "ogg" "OGG" "webm" "WEBM")) (framebuffer-fbmpv filename))))) + ((member x '("mkv" "MKV" "mp4" "MP4" "ogg" "OGG" "webm" "WEBM")) (framebuffer-fbmpv filename)) + ((member x '("mp3" "MP3")) (framebuffer-mocp filename))))) (add-hook 'framebuffer-image-mode-hook