summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-eww.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2026-11-27 22:59:47 +0000
committerjao <jao@gnu.org>2026-11-27 22:59:47 +0000
commitbca51e1655d5a305745b7826cf5134f37f6a960a (patch)
tree47fa78d6fa69e004f412087722583b2efac1e95d /custom/jao-custom-eww.el
parent307f2adf232ab89325549346aadab69ed1702b8d (diff)
downloadelibs-bca51e1655d5a305745b7826cf5134f37f6a960a.tar.gz
elibs-bca51e1655d5a305745b7826cf5134f37f6a960a.tar.bz2
afio refactorings
Diffstat (limited to 'custom/jao-custom-eww.el')
-rw-r--r--custom/jao-custom-eww.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el
index 3cc10cb..5b39c18 100644
--- a/custom/jao-custom-eww.el
+++ b/custom/jao-custom-eww.el
@@ -118,6 +118,27 @@
;;; sessions
(use-package jao-eww-session :demand t)
+(defun jao-afio--open-eww-session ()
+ (if-let* ((b (jao-eww-session-eww-buffers)))
+ (switch-to-buffer (car b))
+ (jao-eww-session-load)))
+
+(defun jao-afio-open-eww ()
+ (interactive)
+ (require 'jao-eww-session)
+ (if (< (frame-width) 160)
+ (jao-afio--open-eww-session)
+ (jao-afio-trisect)
+ (jao-afio--open-eww-session)
+ (let ((b (current-buffer)))
+ (other-window 1)
+ (switch-to-buffer (car (jao-eww-session-eww-buffers b)))
+ (other-window 1)
+ (switch-to-buffer (car (jao-eww-session-eww-buffers b)))
+ (other-window 1))))
+
+(setq jao-afio-open-www #'jao-afio-open-eww)
+
;;; eww to org
(defun jao-eww-to-org (&optional dest)
(interactive "P")