Skip to content

Instantly share code, notes, and snippets.

From 2a6144e940e27fdf39b42454ec8a6b6ff2589d93 Mon Sep 17 00:00:00 2001
From: Orivej Desh <[email protected]>
Date: Sun, 5 May 2013 02:29:41 +0400
Subject: [PATCH] recursive-imap
---
src/drv_imap.c | 2 +-
src/drv_maildir.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 60 insertions(+), 5 deletions(-)
@orivej
orivej / screenshot.lisp
Last active June 5, 2018 15:20 — forked from liftoff/xcb_screenshot.py
Take, save, and display a screenshot in Common Lisp (using CLX and ZPNG).
(defmacro with-display (host (display screen root-window) &body body)
`(let* ((,display (xlib:open-display ,host))
(,screen (first (xlib:display-roots ,display)))
(,root-window (xlib:screen-root ,screen)))
(unwind-protect (progn ,@body)
(xlib:close-display ,display))))
(defun take-screenshot (&optional (host ""))
(with-display host (display screen root-window)
(xlib:get-image root-window :x 0 :y 0 :width (xlib:screen-width screen) :height (xlib:screen-height screen))))