I'm trying to make a simple reminder timer like this:
#/bin/bash
STRING=$(zenity --forms --title="$OPTION" --add-entry="Enter timer duration: (3600s = 60m = 1h)" --add-entry="Remind me about: ")
TIMER=$(echo $STRING | cut -d"|" -f1)
REASON=$(echo $STRING | cut -d"|" -f2)
if [ $TIMER ]
then
if [ $REASON ]
then
zenity --info --title="Confirmation" --text="I will remind you about \"$REASON\"\n in \"$TIMER\""
sleep $TIMER
zenity --info --title="Timer done" --text="It has now been $TIMER\n\nRemember \"$REASON\"\nTimer done at: `date | awk '{ print $4 }'`"
else
zenity --info --timeout 3 --title="$OPTION" --text="You will be reminded in $TIMER"
sleep $TIMER
zenity --info --title="Timer done" --text="It has now been $TIMER\nTimer done at: `date | awk '{ print $4 }'`"
fi
fi
It works fine but the enter key doesn't press OK on --forms. It does on --entry.
How can I make it work on --forms?