images dialog

Category: Yad GUI Published: 15 November 2017
Written by Bobby Cooper Hits: 568

yad --images as a slide show. 

 This script allows you to create a full screen slideshow. Like below is to a video. I have since added 1 second sleep (pause) as it seem nicer than quick flash between images.

 

Youtube Video - YadBash Slideshow

 

You will also need a images.txt file in same path as set for the file variable for imageDir="..."

export sets file path global in both yad main program and child yad that displays image.

The parent yad window provides a blue background window to hide desktop.

 

#!/bin/bash
# This is file: slideshow
# Its a Yadbash program by Bobby Cooper - http://YadBash.com

export imageDir="$HOME/yadbash/slideshow"

show_canvas(){

yad --image="$imageDir/yad-slide-bkgrnd-canvas.jpg" \
--on-top \
--undecorated \
--width=1366 \
--height=768 \
--no-buttons &

bash -c show_images
}
export -f show_canvas

show_images(){

for file in $(<$imageDir/images.txt)

do

yad --image="$imageDir/${file}" \
--undecorated \
--on-top \
--timeout=3 \
--width=1366 \
--height=768 \
--no-buttons

sleep 1

done

killall yad
}
export -f show_images

bash -c show_canvas