#!/bin/bash
#Simple Yad Frontend for Yabridge Folders


#Select the Windows VST folder to add

              
location=\
`yad\
 --file\
 --directory\
 --title="Find VST Folder"\
 --center\
 --window-icon=/usr/local/share/icons/yadbridge/folderadd.png\
 --text="Find a Folder containing Windows VST Plugins"`


$HOME/.local/share/yabridge/yabridgectl add "$location"

if [ "$?" = "0" ]; then

yad\
 --height=120\
 --width=240\
 --title="YADbridge"\
 --center\
 --window-icon=/usr/local/share/icons/yadbridge/folderadd.png\
 --image=gtk-dialog-info\
 --no-buttons\
 --text="VST Folder Added!"

else

yad\
 --height=120\
 --width=240\
 --title="YADbridge"\
 --center\
 --window-icon=/usr/local/share/icons/yadbridge/folderadd.png\
 --image=gtk-dialog-error\
 --no-buttons\
 --text="VST Folder Not Added!"
            
fi
               
exit
