12345678910111213141516171819202122 |
- #!/usr/bin/env sh
- #
- # pbrisbin 2013 - record screen area as a gif. Requires ffcast (for
- # xrectsel) and byzanz (for the actual recording).
- #
- ###
- set -e
-
- out="${1:-out.gif}"
-
- if [ -e "$out" ]; then
- printf "%s exists. removing...\n" "$out" >&2
- rm "$out"
- fi
-
- tmp=temp.gif
- geometry_args="$(xrectsel "--x=%x --y=%y --width=%w --height=%h")"
-
- trap "convert -loop 0 '$tmp' '$out' && rm '$tmp'" EXIT
-
- printf "Recording %s. Press ^C when done.\n" ./"$out"
- byzanz-record -d 3600 $geometry_args "$tmp" # word-splitting intended
|