emacs-framebuffer

Emacs library to show images and documents in console using Linux framebuffer
Log | Files | Refs

commit 5df2f73c86faefabc7357a996251f64f694756f7
parent cee4220faa4c17632e25064ff5a8faa545360fe9
Author: Tomas Hlavaty <tom@logand.com>
Date:   Fri, 29 May 2020 23:49:51 +0200

introduce framebuffer-draw-delay

draw on framebuffer after emacs did its drawing

Diffstat:
Memacs-framebuffer.el | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el @@ -39,6 +39,11 @@ :type 'number :group 'framebuffer) +(defcustom framebuffer-draw-delay "0.1 sec" + "Specify the delay after which to draw on the framebuffer." + :type 'number + :group 'framebuffer) + (defun framebuffer-size () (if (and framebuffer-width framebuffer-height) (cons framebuffer-width framebuffer-height) @@ -49,11 +54,14 @@ (cons (read (match-string 1)) (read (match-string 2)))) (cons framebuffer-default-width framebuffer-default-height)))) -(defun framebuffer-draw (x y w h file) +(defun framebuffer-draw-now (x y w h file) (with-temp-buffer (insert (format "0;1;%d;%d;%d;%d;;;;;%s\n" x y w h (expand-file-name file))) (call-process-region (point-min) (point-max) "w3mimgdisplay"))) +(defun framebuffer-draw (x y w h file) + (run-at-time framebuffer-draw-delay nil 'framebuffer-draw-now x y w h file)) + (defun framebuffer-buffer-brook () (lambda () (let ((z (char-after)))