Skip to content

Instantly share code, notes, and snippets.

@tnajdek
Created February 24, 2014 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnajdek/9193053 to your computer and use it in GitHub Desktop.
Save tnajdek/9193053 to your computer and use it in GitHub Desktop.
#!/bin/bash
URL="http://google.com/"
resolutions=( 1366x768 320x480 480x800 1024x768 320x568 1280x800 1920x1080 360x640 768x1024 720x1280 1440x900 1600x900 1280x1024 320x534 320x401 1680x1050 540x960 360x592 480x854 1024x600 )
killall firefox
for i in "${resolutions[@]}"
do
echo $i
pair=`echo $i | tr "x" " "`
firefox &
sleep 1
WID=`xdotool search --title "Mozilla Firefox" | head -1`
xdotool windowsize --sync $WID $pair
firefox -new-tab $URL
sleep 10
import -window $WID -screen `date -Ins`$i.png
killall firefox
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment