#! /bin/zsh # This file: http://user.it.uu.se/~embe8573/.zsh/movie # Example movie: http://user.it.uu.se/~embe8573/align # vt: ~/.zsh/vt emacs-audio-rec () { local name=$1 rec ${name}.wav &> /dev/null & # check out with 'play' of SoX(1); local pid=$! # if OK, do 'avconv -i name.wav name.mp3' ttyrec -e emacs $name # to do, e.g., 18M -> 1.5M for a kill -9 $pid 2> /dev/null # 1 minute and 33 seconds file } emacs-rec () { ttyrec -e emacs $1 } # first, 'sudo aptitude install libsox-fmt-mp3' tty-mp3-play () { local name=$1 play ${name}.mp3 &> /dev/null & ttyplay $name } ttylen () { local seconds=`ttytime $1 | tr '\t' ' ' | tr -s ' ' | cut -d' ' -f2` units "$seconds s" hms }