#!/bin/bash
# Script Name: View GTK default icons using yad & bash
# Author: Robert Cooper, Offternet.com
# ver: 1.0
# Date: 2022/08/23
# License: GPL 3
# Research: Yad Gui Group -
https://groups.google.com/g/yad-common# Yad Author is: Victor Ananjevsky
# SPECIAL INSTALL & FUNCTIONALITY Instructions - copy yad to yad2 (or yad4 in below example script)
# For example on Debian.-> sudo cp /usr/local/bin/yad /usr/local/bin/yad2
# yad2 is used to close yad2 windows, etc.
export logFile="/home/yad/launcher/scripts/term-feedback.log"
export logDir="/home/yad/launcher/scripts"
export codeDir="/home/yad/laucher/scripts/source"
rm $logDir/term-feedback.log
cp $logDir/empty.log $logDir/term-feedback.log
update_vgcode() {
echo "Now updating YADGUI Video Gallery Code" > $logFile
sleep 3
cd /home/yad/launcher/scripts/source/
echo "Directory changed to" >> $logFile
pwd >> $logFile
echo "Downloading updated config file for YADGUI Video Gallery folder" >> $logFile
wget -a /home/yad/launcher/scripts/term-feedback.log
http://yadgui.com/yad/launcher/scripts/source/import-videos-list.sourceecho "" >> $logFile
echo "" >> $logFile
echo "Closing Connection to YADGUI Server" >> $logFile
echo "YADGUI Video Gallery Code is Now up to date." >> $logFile
sleep 3
echo "" >> $logFile
echo "Code by Offternet -
http://yadgui.com" >> $logFile
echo "" >> $logFile
echo "ALL DONE !!! Please Click Close Button" >> $logFile
}
export -f update_vgcode
tail -f $logDir/term-feedback.log | yad4 --text-info --text="Update YADGUI Video Gallery Code" --width=500 --height=500 --on-top --center --button="Update Now":"bash -c update_vgcode" --button="Close:0" > $logDir/term-feedback.log --tail