aboutsummaryrefslogtreecommitdiff
path: root/scripts/take-screenshots.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/take-screenshots.sh')
-rwxr-xr-xscripts/take-screenshots.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/take-screenshots.sh b/scripts/take-screenshots.sh
new file mode 100755
index 0000000..77174cb
--- /dev/null
+++ b/scripts/take-screenshots.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+##### Requirements #####
+# - scrot
+# - imagemagick
+################## #####
+
+wai=$(dirname $(readlink -f $0))
+theme_loc="${wai}/../themes/"
+i3_colors="${wai}/../src/i3-colors.py"
+
+echo "Get ready for screenshots (5s)..."
+sleep 5
+for theme in $(ls ${theme_loc}|grep -v ".jpg")
+do
+ $i3_colors -r ${theme_loc}/${theme}
+ sleep 2 # Wait for i3 reload
+ scrot ${wai}/${theme}.png
+done
+
+
+for shot in ${wai}/*.png
+do
+ x=$(identify $shot|awk '{print $3}'|cut -dx -f1)
+ y=52 # Please change according to your resolution
+ convert $shot -crop ${x}x${y} output_tmp.jpg
+ mv output_tmp-0.jpg $(basename $shot|sed "s/.png/.jpg/g")
+ rm ${shot}
+done
+
+rm ${wai}/output_tmp*.jpg
+
+
+