#!/bin/sh
FRAK=./frak
W=$(stty size|cut -f2 -d' ')
H=$(($(stty size|cut -f1 -d' ') * 2))

oldtty=$(stty -g) # restore stty settings
stty -icanon -echo min 0

while true
do
	KEY=$(dd bs=1 count=1 2> /dev/null)

	case $KEY in
	q)
		break
		;;
	esac	
	
	${FRAK} $PARAMS -w $W -h $H -nogui|convert tga:- pbm:-|pbmtoascii
done

stty "$oldtty" # restore stty settings


