#!/bin/bash # # capture a screenshot.. # # usage: # scr [output filename (optional)] # # note: if a filename isn't specified, scr defaults to ~/screenshot.raw # which is a file called "screenshot.raw" in your home folder # # the screen capture is saved as a three channel (RGB) interleaved # bitmap image with BGR ordering and a 0 byte header. # # have fun! # # ;o) # (or @ corz.org 2005 # if [ "$1" = '-h' ]; then echo; echo "usage: src []"; echo; exit; fi if [ "$1" = '' ]; then out=~/screenshot.raw; else out=$1; fi cat /dev/fb0 > ${out} echo echo "screenshot saved to $out" echo