From 984bff80c7dbe96e06cb3bd7ff90f1adfaca8ea5 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 7 Apr 2021 04:28:59 +0100 Subject: elpher (gemini/gopher browser) --- eww.org | 3 ++- init.org | 7 ++++++- lib/themes/jao-themes.el | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/eww.org b/eww.org index 87beb30..e0b12b3 100644 --- a/eww.org +++ b/eww.org @@ -16,7 +16,8 @@ (setq jao-browse-url-function #'jao-eww-browse-url) (setq browse-url-browser-function jao-browse-url-function) - #+end_src + (setq eww-use-browse-url "^\\(gemini\\|gopher\\):") + #+end_src * Email #+begin_src emacs-lisp (defun jao-eww-html-renderer (handle) diff --git a/init.org b/init.org index b350f92..bd2655b 100644 --- a/init.org +++ b/init.org @@ -2162,8 +2162,13 @@ (defun jao--find-file-other-window (url &rest _) (find-file-other-window (jao--fln url))) + (use-package elpher :ensure t) + + (defun jao-elpher--browse (url &rest _) (elpher-go url)) + (setq browse-url-handlers - `((,jao--doc-exts . jao--browse-doc) + `(("^\\(gemini\\|gopher\\)://.*" . jao-elpher--browse) + (,jao--doc-exts . jao--browse-doc) (,jao--see-exts . jao--see) ("^file://?.+\\.html?$" . ,jao-browse-url-function) ("^file://?" . jao--find-file-other-window) diff --git a/lib/themes/jao-themes.el b/lib/themes/jao-themes.el index 5543c9b..a7e59b1 100644 --- a/lib/themes/jao-themes.el +++ b/lib/themes/jao-themes.el @@ -473,6 +473,11 @@ (ediff-odd-diff-Ancestor (~ ediff-odd-diff-A) nbf) (ediff-odd-diff-B (~ ediff-odd-diff-A)) (ediff-odd-diff-C (~ ediff-odd-diff-A)) + (elpher-gemini-heading1 (p outline-1)) + (elpher-gemini-heading2 (p outline-2)) + (elpher-gemini-heading3 (p outline-3)) + (elpher-gemini-preformatted (~ font-lock-doc-face)) + (elpher-other-url (p link) it) (emms-browser-album-face (p f00) :height 1.0) (emms-browser-artist-face (p f01) :height 1.0) (emms-browser-composer-face (p f02) :height 1.0) -- cgit v1.2.3