aboutsummaryrefslogtreecommitdiff
path: root/shoshimacs.org
diff options
context:
space:
mode:
authorshoshin <shoshin@cicadas.surf>2022-12-13 21:30:46 -0600
committershoshin <shoshin@cicadas.surf>2022-12-13 21:30:46 -0600
commita2001f71346a0263a5be7364c925a10c021960ec (patch)
treec5eb0290c47a77e480b7da114a0caf4a0d0d37b9 /shoshimacs.org
parent204f093105df43fb5266021eaa2599efac25908e (diff)
Add: screenshot-svg command
Diffstat (limited to 'shoshimacs.org')
-rw-r--r--shoshimacs.org15
1 files changed, 15 insertions, 0 deletions
diff --git a/shoshimacs.org b/shoshimacs.org
index cc1529e..d58220a 100644
--- a/shoshimacs.org
+++ b/shoshimacs.org
@@ -1031,6 +1031,21 @@ for theme development.
(package-install 'autothemer)
#+end_src
+** SVG Screenshot
+
+#+begin_src emacs-lisp
+(defun screenshot-svg ()
+ "Save a screenshot of the current frame as an SVG image.
+Saves to a temp file and puts the filename in the kill ring."
+ (interactive)
+ (let* ((filename (make-temp-file "Emacs" nil ".svg"))
+ (data (x-export-frames nil 'svg)))
+ (with-temp-file filename
+ (insert data))
+ (kill-new filename)
+ (message filename)))
+#+end_src
+
** windresize
#+begin_src emacs-lisp