From bca51e1655d5a305745b7826cf5134f37f6a960a Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 27 Nov 2026 22:59:47 +0000 Subject: afio refactorings --- custom/jao-custom-eww.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'custom/jao-custom-eww.el') 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") -- cgit v1.2.3