Save one/all of the following two scripts in a folder within your $PATH. Here's an example on using the first script to make a screencast of a specific window.
- Run byzanz-record-window 30 -c output.gif
- Go to the window (alt-tab) you want to capture. Click on it.
- Wait 10 seconds (hard-coded in $DELAY), in which you prepare for recording.
- After the beep (defined in the beep function), byzanz will start.
- After 30 seconds (that's the meaning of 30 in step 1), byzanz ends. A beep will be broadcast again.
- I included the -c flag in byzanz-record-window to illustrate that any arguments to my shell script are appended to byzanz-record itself. The -c flag tells byzanz to also icnlude the cursor in the screencast.