nsbin/mk-screenshot
Nico Schottelius d3c6e29902 Initial commit
2006-07-20 09:54:37 +02:00

17 lines
302 B
Bash
Executable file

#!/bin/sh
#
# Nico Schottelius <nico-linux@schottelius.org>
# Date: 22-Sep-2004
# Last Modified: -
#
if [ $# -lt 1 ]; then
echo "`basename $0` name_of_screenshot"
exit 1
fi
name=$1
file="$name-screenshot-`date +%Y%m%d`.png"
[ -e "$file" ] && return 1
xwd -root | xwdtopnm | pnmtopng > "$file"