Yep could be smaller but otherwise well done :) Still nice to see another method.
Not a bad point, just something to say about the picture window.
If you set -1 -1 to a picwin, it doesn\'t center at all with a dual screen system (at least for me ;p), the picwin open in my second monitor to the up/left
There\'s this flag -C (and then you can put 0 0 instead -1 -1