emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/easy-escape 63fa5fc 19/27: Update screenshot


From: ELPA Syncer
Subject: [elpa] externals/easy-escape 63fa5fc 19/27: Update screenshot
Date: Tue, 14 Sep 2021 17:57:32 -0400 (EDT)

branch: externals/easy-escape
commit 63fa5fcf9a53b7d3c1e872081e65afad5a722ba8
Author: Clément Pit--Claudel <clement.pitclaudel@live.com>
Commit: Clément Pit--Claudel <clement.pitclaudel@live.com>

    Update screenshot
---
 img/easy-escape-other-character.png | Bin 18528 -> 0 bytes
 img/easy-escape-other-color.png     | Bin 18538 -> 0 bytes
 img/easy-escape.png                 | Bin 18493 -> 11532 bytes
 img/ee-screenshot.el                |  81 ++++++++++++++++++++++++++++++++++++
 4 files changed, 81 insertions(+)

diff --git a/img/easy-escape-other-character.png 
b/img/easy-escape-other-character.png
deleted file mode 100644
index 6befc5d..0000000
Binary files a/img/easy-escape-other-character.png and /dev/null differ
diff --git a/img/easy-escape-other-color.png b/img/easy-escape-other-color.png
deleted file mode 100644
index 3357fac..0000000
Binary files a/img/easy-escape-other-color.png and /dev/null differ
diff --git a/img/easy-escape.png b/img/easy-escape.png
index 4586880..8d52230 100644
Binary files a/img/easy-escape.png and b/img/easy-escape.png differ
diff --git a/img/ee-screenshot.el b/img/ee-screenshot.el
new file mode 100644
index 0000000..8ab7e99
--- /dev/null
+++ b/img/ee-screenshot.el
@@ -0,0 +1,81 @@
+;;; ee-screenshot.el --- Prepare a screenshot for easy-escape  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Clément Pit-Claudel
+
+;; Author: Clément Pit-Claudel <clement@clem-w50-mint>
+;; Keywords:
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; emacs -Q -l ee-screenshot.el -f '~/main'
+
+;;; Code:
+
+(add-to-list 'load-path "../")
+(require 'easy-escape)
+
+(defvar ~/strs
+  '(("^\\([aA]\\)\\(#\\|!\\)\\([ \\t\\n\\v\\r]*\\)[:/]\\(\\\\\\)\\(...\\)$")
+    ("\\.\\(gz\\|Z\\|bz\\|bz2\\|xz\\|gpg\\)\\'" "\\((\\||\\|)\\)")))
+
+(defun ~/setup (buf mode-status prelude)
+  (with-current-buffer buf
+    (emacs-lisp-mode)
+    (easy-escape-minor-mode mode-status)
+    (insert prelude "\n")
+    (dolist (strs ~/strs)
+      (insert " " (mapconcat #'prin1-to-string strs "  ") "\n"))
+    (setq cursor-type nil)
+    (goto-char (point-min))
+    (set-buffer-modified-p nil)))
+
+(defun ~/capture ()
+  (force-window-update)
+  (redisplay t)
+  (let ((png-fname "easy-escape.png"))
+    (call-process "import" nil nil nil "-window" (frame-parameter nil 
'outer-window-id) png-fname)
+    (call-process "mogrify" nil nil nil "-strip" "-matte"
+                  "-bordercolor" (face-attribute 'fringe :background)
+                  "-border" (format "0x%d" (car fringe-mode))
+                  png-fname)
+    (call-process "optipng" nil nil nil "-o3" png-fname))
+  (kill-emacs))
+
+(defun ~/main ()
+  (interactive)
+  (menu-bar-mode -1)
+  (tool-bar-mode -1)
+  (scroll-bar-mode -1)
+  (load-theme 'tango t)
+  (set-fringe-mode (cons 8 8))
+  (set-face-attribute 'default nil :family "Ubuntu Mono" :height 110)
+  (set-face-attribute 'mode-line-buffer-id nil :foreground "#eab700")
+  (set-face-attribute 'mode-line nil :foreground "gray60" :background "black")
+  (set-face-attribute 'mode-line-inactive nil :foreground "gray60" :background 
"black")
+  (let ((before (get-buffer-create "*before*"))
+        (after (get-buffer-create "*after*")))
+    (~/setup before -1 "\n ;; Before:")
+    (~/setup after 1 " ;; After:")
+    (switch-to-buffer before)
+    (switch-to-buffer-other-window after))
+  ;; (with-current-buffer before
+  (setq-default mode-line-format nil)
+  (set-frame-size nil 72 4)
+  (message nil)
+  (run-with-timer 3 nil #'~/capture))
+
+(provide 'ee-screenshot)
+;;; ee-screenshot.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]