Skip to content

Instantly share code, notes, and snippets.

@muralisc
Last active November 21, 2017 00:22
Show Gist options
  • Save muralisc/c0f6c2093e6c40c9d9f7 to your computer and use it in GitHub Desktop.
Save muralisc/c0f6c2093e6c40c9d9f7 to your computer and use it in GitHub Desktop.

Revisions

  1. muralisc revised this gist Feb 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vim_colorscheme_screenshots
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ 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 | grep colorsc
    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
  2. muralisc created this gist Feb 17, 2015.
    18 changes: 18 additions & 0 deletions vim_colorscheme_screenshots
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/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 | grep colorsc
    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