parent
a11c0cdeb0
commit
b462cc8785
73
init.el
73
init.el
|
@ -177,42 +177,41 @@
|
||||||
(add-to-list '+browse-url-secondary-browser-regexps
|
(add-to-list '+browse-url-secondary-browser-regexps
|
||||||
(replace-regexp-in-string "\\." "\\\\." domain)))
|
(replace-regexp-in-string "\\." "\\\\." domain)))
|
||||||
;; Set up URL handlers.
|
;; Set up URL handlers.
|
||||||
(with-eval-after-load 'org-contacts
|
(require 'chd)
|
||||||
(require 'chd)
|
(+browse-url-set-handlers
|
||||||
(+browse-url-set-handlers
|
(list
|
||||||
(list
|
(cons (rx ; images
|
||||||
(cons (rx ; images
|
"." (or "jpeg" "jpg" "png" "bmp") eos)
|
||||||
"." (or "jpeg" "jpg" "png" "bmp") eos)
|
(lambda (&rest args)
|
||||||
(lambda (&rest args)
|
(apply
|
||||||
(apply
|
(cond ((executable-find "mpv") #'+browse-image-with-mpv)
|
||||||
(cond ((executable-find "mpv") #'+browse-image-with-mpv)
|
(t #'eww-browse-url))
|
||||||
(t #'eww-browse-url))
|
args)))
|
||||||
args)))
|
(cons (rx (or ;; videos
|
||||||
(cons (rx (or ;; videos
|
"youtube.com" "youtu.be" "invidious" "yewtu.be"
|
||||||
"youtube.com" "youtu.be" "invidious" "yewtu.be"
|
(seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos)
|
||||||
(seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos)
|
;; music
|
||||||
;; music
|
"soundcloud.com" "bandcamp.com"
|
||||||
"soundcloud.com" "bandcamp.com"
|
(seq "." (or "ogg" "mp3" "opus" "m4a") eos)))
|
||||||
(seq "." (or "ogg" "mp3" "opus" "m4a") eos)))
|
(lambda (&rest args)
|
||||||
(lambda (&rest args)
|
(apply (if (executable-find "mpv")
|
||||||
(apply (if (executable-find "mpv")
|
#'+browse-url-with-mpv
|
||||||
#'+browse-url-with-mpv
|
browse-url-secondary-browser-function)
|
||||||
browse-url-secondary-browser-function)
|
args)))
|
||||||
args)))
|
(cons chd/url-regexps #'browse-url-chrome)
|
||||||
(cons chd/url-regexps #'browse-url-chrome)
|
(cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites
|
||||||
(cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites
|
(lambda (&rest args)
|
||||||
(lambda (&rest args)
|
(apply browse-url-secondary-browser-function args)))
|
||||||
(apply browse-url-secondary-browser-function args)))
|
(cons "xkcd\\.com"
|
||||||
(cons "xkcd\\.com"
|
(lambda (&rest args)
|
||||||
(lambda (&rest args)
|
(apply (if (fboundp #'xkcd-get)
|
||||||
(apply (if (fboundp #'xkcd-get)
|
(progn (require '+xkcd)
|
||||||
(progn (require '+xkcd)
|
#'+xkcd-get-from-url)
|
||||||
#'+xkcd-get-from-url)
|
+browse-url-browser-function)
|
||||||
+browse-url-browser-function)
|
args)))
|
||||||
args)))
|
(cons "." ; everything else
|
||||||
(cons "." ; everything else
|
(lambda (&rest args)
|
||||||
(lambda (&rest args)
|
(apply +browse-url-browser-function args)))))
|
||||||
(apply +browse-url-browser-function args))))))
|
|
||||||
;; Transform URLs before passing to `browse-url'
|
;; Transform URLs before passing to `browse-url'
|
||||||
(:option +browse-url-transformations `((,(rx (or "youtube.com"
|
(:option +browse-url-transformations `((,(rx (or "youtube.com"
|
||||||
"youtu.be"))
|
"youtu.be"))
|
||||||
|
@ -698,7 +697,7 @@
|
||||||
:unnarrowed t))
|
:unnarrowed t))
|
||||||
(+org-capture-sort))
|
(+org-capture-sort))
|
||||||
|
|
||||||
(setup org-contacts
|
(setup org-contacts (:quit)
|
||||||
(:load-after org)
|
(:load-after org)
|
||||||
(:also-straight org-vcard) ; for importing Vcard files
|
(:also-straight org-vcard) ; for importing Vcard files
|
||||||
(:option org-contacts-matcher "contact") ; Contacts are tagged "contact"
|
(:option org-contacts-matcher "contact") ; Contacts are tagged "contact"
|
||||||
|
|
BIN
ponder.png
BIN
ponder.png
Binary file not shown.
Loading…
Reference in New Issue