#!/bin/csh -f #H# Snaps a screenshot using xwd. Resulting screenshot file will be named ~/x.png # print usage info if needed if ($1 != "") exec sed -n -e '/^\#H\#/s/^....//p' $0 # remove the -frame if you don't want the window manager decorations xwd -frame > x.xwd gm convert -antialias x.xwd x.png && rm -f x.xwd # import is an alternative to xwd/convert however I dislike it because even though it is # simpler it has a delay that I find annoying. Still I included it here just in case. #import -frame x.png #import -window root screenshot.png