Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#!/bin/bash
# eev-videos/0.sh - bash-y functions for recording screencats.
# This file: http://angg.twu.net/eev-videos/0.sh.html
#            http://angg.twu.net/eev-videos/0.sh
#             (find-angg        "eev-videos/0.sh")
# Use with:
#   source ~/eev-videos/0.sh; # (find-angg "eev-videos/0.sh")

# (find-es "ffmpeg" "screencasts")
# (find-es "ffmpeg" "script-2012oct")
# (find-man "1 ffmpeg" "-s size" "  cif")
# (defun c () (interactive) (find-bgprocess "~/eev-videos/1.sh xterm"))
# (find-sh  "~/eev-videos/1.sh ffmpeg 540x600+0+0")
# (find-sh  "~/eev-videos/1.sh down")
# (find-sh0 "~/eev-videos/1.sh      xterm 80x30+0+0")
# (find-sh0 "~/eev-videos/1.sh                      ffmpeg 540x600+0+0")
# (find-sh0 "~/eev-videos/1.sh      xterm 80x30+0+0 ffmpeg 540x600+0+0")
# (find-sh0 "~/eev-videos/1.sh down xterm 80x30+0+0 ffmpeg 540x600+0+0")
# (find-sh0 "~/eev-videos/0.sh down xterm 80x32+0+0 ffmpeg 530x550+0+0")
# (find-fline    "/tmp/" "out.")
# (find-mplayer0 "/tmp/out.mp4")
# (find-mplayer0 "/tmp/out.avi")
# (find-sh0 "killall    ffmpeg")
# (find-sh0 "killall -9 ffmpeg")
# (find-sh0 "cp -v /tmp/out.mp4 ~/eev-videos/test.mp4")
# (find-sh0 "ls -lAF ~/eev-videos/test.mp4")
# (ee-cp "~/eev-videos/test.mp4" (ee-twupfile "eev-videos/test.mp4"))
#  http://angg.twu.net/eev-videos/test.mp4
# (find-sh0 "mplayer ~/eev-videos/test.mp4")
# (find-mplayer0 "/tmp/out.mp4")
# (find-sh "ffprobe /tmp/out.mp4")
# (find-man "1 nohup")
# (find-node "(coreutils)nohup invocation")
# (find-es "x" "screen-dimensions")
# (find-sh "xdpyinfo | grep 'dimensions:' | awk '{print $2}'")

# (find-bashnode "Shell Functions" "`0'")

# Command-line arguments for screencasts
exec-xterm  () { G=$1; shift; exec xterm -T xterm -geometry $G -e $0 $*; }
fvwm-down   () { FvwmCommand "CursorMove +0 +100"; }
ffmpeg-kill () { killall -q avconv; }
ffmpeg-grab () {
  rm -f /tmp/out.mp4
  rm -f /tmp/out.avi
  rm -f /tmp/out.log
  { # echo  ffmpeg -loglevel quiet -f x11grab -i $DISPLAY $* /tmp/out.mp4
    # nohup ffmpeg -loglevel quiet -f x11grab -i $DISPLAY $* /tmp/out.mp4 &
    #echo  avconv -loglevel quiet -f x11grab -i $DISPLAY $* /tmp/out.mp4
    #nohup avconv -loglevel quiet -f x11grab -i $DISPLAY $* /tmp/out.mp4 &
    echo  avconv $* -f x11grab -i $DISPLAY /tmp/out.mp4
    nohup avconv $* -f x11grab -i $DISPLAY /tmp/out.mp4 &
  } > /tmp/out.log 2>&1
  # > /dev/null 2>&1 &
}
if [[ "$1" == "down"    ]]; then fvwm-down; shift; fi
if [[ "$1" == "ffmpeg"  ]]; then ffmpeg-grab -r 5 -s $2; shift 2; fi
if [[ "$1" == "ffmpeg0" ]]; then ffmpeg-grab -r 5;       shift 1; fi
if [[ "$1" == "xterm"   ]]; then shift; exec-xterm $*; fi

# Colors
C0=$(tput sgr0)
C1=$(tput setaf 3; tput setab 1; tput bold;)
CB=$(tput bold; tput setaf 4)
CG=$(tput setaf 2)

# Sleep
slep () { sleep $1; }
slep () { stty -echo; read; stty echo; }
slep () { read -s; }

# sleep-then-echo, sleep-then-cat
se   () { read; echo "$2"; }
se   () { echo; slep $1; echo "$2"; }
sc   () { echo; slep $1; cat; }

# display-prompt-and-command
dpc  () {
  echo -n "${CG}$PWD(edrx)\$${C0} "; slep 1;
  echo -n "$*"; slep 1;
  echo;
}
# display-and-eval
de () { dpc "$*"; eval $*; }