From 04086ec1e3a717bc83dceb9d009fd600dbc12433 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 10 Sep 2021 18:27:54 -0500 Subject: Add browse-url-browser-function --- init.el | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/init.el b/init.el index de77912..801765b 100644 --- a/init.el +++ b/init.el @@ -140,10 +140,23 @@ AKA, DO NOT USE THIS FUNCTION!!!" "png") eos)) (lambda (&rest args) - (apply (if (executable-find "feh") - #'browse-url-feh - #'eww-browse-url) - args))) + (apply + (cond ((executable-find "feh") #'browse-url-feh) + ((executable-find "mpv") + (defun browse-image-url-mpv (url &rest _args) + "View an image URL in mpv." + (let ((url (browse-url-encode-url url)) + (process-environment + (browse-url-process-environment))) + (message "Viewing %s in mpv..." url) + (apply #'start-process + (concat "mpv " url) nil + "mpv" + (append browse-url-mpv-arguments + (list "--image-display-duration=inf" + url)))))) + (t #'eww-browse-url)) + args))) (cons (rx (or "youtube.com" ; videos "youtu.be" (seq "." (or "mp4" @@ -219,7 +232,9 @@ AKA, DO NOT USE THIS FUNCTION!!!" :channels ("#basement") :sasl-username ,circe-default-nick :sasl-password ,(acdw/make-password-fetcher - :host "m455.casa"))) + :host "m455.casa")) + ;; TODO: irc.chat.twitch.tv + ) circe-reduce-lurker-spam t circe-server-auto-join-default-type :after-auth) -- cgit 1.4.1-21-gabe81