Last active
November 21, 2017 00:22
-
-
Save muralisc/c0f6c2093e6c40c9d9f7 to your computer and use it in GitHub Desktop.
A quick script for creating screenshots of colorschemes in "flazz/vim-colorschemes"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
geo=235x65+0+0 | |
cSchemes=`ls -1 ~/.vim/bundle/vim-colorschemes/colors | sed 's/.vim$//'` | |
for currentScheme in $cSchemes | |
do | |
sed -i "s/^colorscheme .*/colorscheme $currentScheme/" ~/.vimrc | |
urxvt --geometry $geo -e vim ~/.vimrc & | |
pid=$! | |
sleep 0.25 # VERY IMPORTANT for this gap for the window to form | |
# sometimes the status bar wont apprear . Press 'j' to make it appear | |
xdotool key --window `xwininfo -name "vim"| grep ' id'| awk '{print $4}' | xargs printf "%d\n"` j | |
sleep 0.25 # VERY IMPORTANT for this gap for the screenshot to capture | |
scrot ${currentScheme}.png | |
kill $pid | |
done | |
rm vimCSscreenshots.tgz | |
tar czf vimCSscreenshots.tgz *.png | |
rm *.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment