#!/bin/bash
########################################################## 
# BibleVerse, displays bible verses from the KJV bible.  #
#                                                        #
# Gui Author <lxgator@gmail.com>                         #
# GNU Public License Version 3                           #
##########################################################

ICON='/usr/share/bibleverse/bibleverse.png' 
FILE='/tmp/bibleverse'
VER=`cat $FILE | awk '{ print $0 }'`
rm -r $FILE 2>/dev/null
python '/usr/share/bibleverse/bibleverse.py'  
yad --width=600 \
--height=125 \
--text="$VER" \
--window-icon=$ICON \
--image=$ICON \
--title='BibleVerse' \
--button=About!/usr/share/bibleverse/about.svg:2 \
--button=New!/usr/share/bibleverse/add.svg:4 \
--button=Close!/usr/share/bibleverse/cancel.svg:0
if [ "$?" = "4" ]; then
killall bibleverse | bibleverse 
fi |
if [ "$?" = "2" ]; then 
yad --title='BibleVerse' \
--image=$ICON \
--window-icon=$ICON \
--width=450 \
--height=200 \
--text='\n<b>\                         BibleVerse</b> \n\
                                      1.2 \n \n <b>Displays bible verses from the KJV bible</b> \n \n \n \
This program is free software; you can redistribute it 
and/or modify it under the terms of the GNU General Public License.' \
--button=Close!/usr/share/bibleverse/cancel.svg:0
exec "/usr/bin/bibleverse"
fi 

