branch: elpa/gruvbox-theme
commit 4de6e9cddfba9a1875acd2ab658b0d3be08de283
Author: Martijn Terpstra <[email protected]>
Commit: Jason Milkins <[email protected]>
Added function for automated screenshot
Using screenshots is quite useful when showing what faces look like in
a pull requests however can take more time to do by hand than changing
the actual faces so I automated it.
---
gruvbox.el | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gruvbox.el b/gruvbox.el
index c2ebe31b4f..d94fcb9768 100644
--- a/gruvbox.el
+++ b/gruvbox.el
@@ -60,7 +60,24 @@
(file-name-as-directory
(file-name-directory load-file-name))))
-
+(defvar gruvbox-screenshot-command "scrot -u %s%s.png"
+ "Command used to take automated screenshots for gruvbox.
+Should contain 2 %s constructs to allow for theme name and directory/prefix")
+
+(defun gruvbox-screenhot (prefix)
+ "Take a screenshot of all version of the gruvbox theme"
+ (interactive "sScreenshot Prefix: ")
+ (dolist (theme '(gruvbox-light-soft
+ gruvbox-light-medium
+ gruvbox-light-hard
+ gruvbox-dark-soft
+ gruvbox-dark-medium
+ gruvbox-dark-hard))
+ (load-theme theme t)
+ (redisplay t)
+ (load-theme theme t)
+ (shell-command (format gruvbox-screenshot-command
+ prefix theme))))
(defmacro gruvbox-deftheme (name description palette reduced-specs &rest body)
`(autothemer-deftheme