summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-eww.el
diff options
context:
space:
mode:
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")