diff options
author | bd <bdunahu@operationnull.com> | 2024-12-07 20:27:26 -0500 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-12-07 21:29:39 -0500 |
commit | 0308a50f05d1d6afdf5695777faff1262e7982a1 (patch) | |
tree | 6e2a28a4fa6356e9e71e7375748162a05c84b912 /.config/emacs/modules/bd--browse.el | |
parent | 59c898ea14d841864bde19da65b8498d9b0f0a39 (diff) |
Add elpher for gemini browsing
Diffstat (limited to '.config/emacs/modules/bd--browse.el')
-rw-r--r-- | .config/emacs/modules/bd--browse.el | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/.config/emacs/modules/bd--browse.el b/.config/emacs/modules/bd--browse.el index b4e77aa..1854f52 100644 --- a/.config/emacs/modules/bd--browse.el +++ b/.config/emacs/modules/bd--browse.el @@ -70,8 +70,8 @@ icecat, or eww." (use-package eww :hook ((eww-after-render . (lambda () - (setq-local fill-column-desired-width 90) - (fill-column-mode)))) + (setq-local fill-column-desired-width 90) + (fill-column-mode)))) :custom (eww-search-prefix "https://duckduckgo.com/html/?q=") (eww-auto-rename-buffer 'title) @@ -79,6 +79,29 @@ icecat, or eww." "youtube.com" "youtu.be")))) +(use-package elpher + :bind + (:map elpher-mode-map + ("l" . #'elpher-back) + ("d" . #'elpher-download) + ("w" . #'elpher-copy-current-url) + ("A" . #'elpher-copy-link-url) + ("E" . #'elpher-bookmark-current) + ("TAB" . #'elpher-next-link) + ("g" . #'elpher-reload) + ("G" . #'elpher-go)) + :config + (defun bd/elpher (original url &optional new-window) + "Handle gemini links." + (cond ((string-match-p "\\`\\(gemini\\|gopher\\)://" url) + (elpher-go url)) + (t (funcall original url new-window)))) + (advice-add 'eww :around 'bd/elpher) + :custom + (elpher-use-tls t) + (elpher-gemini-max-fill-width 85) + (elpher-use-emacs-bookmark-menu t)) + (use-package apropos :bind (("C-h a" . selector-apropos))) |