#!/bin/sh

sleep 1

size=$(stty size)
set -- $size
h=$(expr $1 - 12)
shift
w=$(expr $@ - 4)

# edit this to point to where you store your IF tads story files (*.gam etc)
export TADS_PATH=/mnt/us/if/tads
# edit this to point to the dialog rc file
export DIALOGRC=/mnt/us/bin/.dialogrc

FILE=$(dialog --stdout --title "Select Interactive Fiction File:" --fselect $TADS_PATH/ $h $w )

clear

if [ "$FILE" != "" ]; then
frob -d "$FILE"
fi
