### vim:ft=zsh:foldmethod=marker
###
### Frank Terbeck <ft@bewatermyfriend.org>
### Last-Modified: Wed Dec 26 14:38:25 2007
###
### URI: <http://ft.bewatermyfriend.org/comp/zsh.html>
###
###
### sleep 5 secs and shot the screen...
###

emulate -L zsh

local -i int

int=$2

if [[ ! -z $1 ]]; then
    if [[ ${int} == 0 ]]; then
        int=5
    fi
    print "i\'ll shot your screen in ${int} seconds..."
    sleep ${int}
    print "$1.png"
    import -quality 100 -window root $1.png
else
    print "usage:\n  $0 <shotname> [wait-interval, in seconds]"
fi