Add browse-url-browser-function

This commit is contained in:
Case Duckworth 2021-09-10 18:27:54 -05:00
parent 4cb2ae1290
commit 04086ec1e3
1 changed files with 20 additions and 5 deletions

25
init.el
View File

@ -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)