diff options
Diffstat (limited to 'emacs/.emacs.d/init/ycp-web.el')
-rw-r--r-- | emacs/.emacs.d/init/ycp-web.el | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/emacs/.emacs.d/init/ycp-web.el b/emacs/.emacs.d/init/ycp-web.el index b1e546c..c50cc46 100644 --- a/emacs/.emacs.d/init/ycp-web.el +++ b/emacs/.emacs.d/init/ycp-web.el @@ -217,6 +217,9 @@ 'turn-off-flyspell) ) +(my-package dnd + (setq dnd-open-remote-file-function 'browse-url)) + (my-package eww (:delay 60) (advice-add 'eww-browse-url :filter-args #'my-rewrite-url-advice) @@ -245,7 +248,25 @@ "T" #'my-eww-top-path "b" #'my-eww-switch-by-title) (my-keybind global-map "\C-c\C-o" #'my-browse-url-at-point) - (my-override browse-url) + (my-setq-from-local my-newscorp-au-amp-nk) + (setq browse-url-handlers + `((exitter-post-url-p + . ,(lambda (url &rest _) (exitter-open-post url))) + (my-hacker-news-url-p + . ,(lambda (url &rest _) (hnreader-comment url))) + (my-mastodon-url-p + . ,(lambda (url &rest _) (mastorg-open url))) + (my-newscorp-au-url-p + . ,(lambda (url &rest _) (my-open-newscorp-au url))) + (reddio-reddit-url-p + . ,(lambda (url &rest _) (reddio-open-url url))) + ("^https?://www.spectator.com.au\\>" . + ,(lambda (url &rest args) (my-open-spectator-au url))) + (my-stack-overflow-url-p + . ,(lambda (url &rest _) (sx-open-link url))) + (wiki-engine-entry-url-p + . ,(lambda (url &rest _) (wiki-open-url url))) + (stringp . browse-url-firefox))) ) (my-package my-semantic-scholar @@ -308,7 +329,8 @@ (my-setq-from-local my-libgen-hosts my-libgen-alt-hosts my-libgen-library-hosts my-libgen-onion-host ) - (setq my-libgen-download-dir my-document-incoming-dir) + (setq my-libgen-download-dir my-document-incoming-dir + my-libfic-download-dir my-document-incoming-dir) (my-libgen-set-random-hosts)) (my-package my-scihub @@ -334,7 +356,10 @@ exitter-oauth-consumer-key exitter-oauth-consumer-secret exitter-access-token exitter-username exitter-password exitter-email exitter-oauth-token exitter-oauth-token-secret exitter-oauth-token-ctime) - (setq exitter-debug t) + (setq exitter-debug nil) ) +(my-package reddio + (:delay 60)) + (provide 'ycp-web) |