#!/bin/dash
# redshift startup script

### conf
CONF=$HOME/.config/redshift.conf
WIZARD=redshiftgui.sh

### main
if [ -f $CONF ]; then
	exec redshift
else
	Xdialog --title "redshift" --infobox \
"Configuration file $CONF not found.
Click OK launch a wizard to create an initial config file based on your location.
" 0 0 10000
	$WIZARD
	if [ -f $CONF ]; then
		exec redshift
	else
		Xdialog --title "redshift" --infobox "You did not create a config file. redshift will not run." 0 0 10000
	fi
fi
