From a5d0c182a514d567bebf99a3fc6a0470f9c06166 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 31 Dec 2021 15:45:31 -0600 Subject: Better setup secondary-browser urls --- init.el | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 6aa375a..e5d113b 100644 --- a/init.el +++ b/init.el @@ -121,22 +121,10 @@ #'+browse-url-with-mpv browse-url-secondary-browser-function) args))) - (cons (rx ; non-eww-friendly websites - (or - "github.com" - "gitlab.com" - "google.com" - "imgur.com" - "pixelfed" "instagram.com" "bibliogram.art" - "reddit.com" "teddit.net" - "tildes.net" - "taskiq" - "twitter.com" "nitter.net" - "streamable.com" - )) - browse-url-secondary-browser-function) - (cons "." ; everything else - #'eww-browse-url))) + (cons (lambda (url) ; non-eww-friendly websites + (cl-member url +browse-url-secondary-browser-regexps + :test 'string-match-p)) + #'browse-url-secondary-browser-function))) ;; Transform URLs before passing to `browse-url' (:option +browse-url-transformations `((,(rx "//" (or "youtube.com" "youtu.be")) @@ -157,7 +145,6 @@ (:option calendar-location-name _location-name calendar-latitude _location-latitude calendar-longitude _location-longitude)) - (setup compile (:option compilation-always-kill t compilation-ask-about-save nil -- cgit 1.4.1-21-gabe81