#!/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 glulx story files (*.blb etc)
export GLULX_PATH=/mnt/us/if/glulx
# edit this to point to the dialog rc file
export DIALOGRC=/mnt/us/bin/.dialogrc

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

clear

if [ "$FILE" != "" ]; then
git "$FILE"
fi
