I shall in all likelihood make it 'more compact', Fred, since I was intending to use thefredx81 wrote:Hi Mike, this should work:Code: Select all
yad --no-buttons --center --window-icon=/usr/local/lib/X11/pixmaps/qiv.png --title="Q.I.V Slideshow" --form --width=450 --text=" Please make your selections:-" \ --field="Choose image directory:-:MDIR" '/root' \ --field="Select timeout interval:-:NUM" '1' \ --field="Run Q.I.V slideshow:FBTN" 'qiv -s -f -i -d %2 %1'
But the dialog stays open, don't know if you want that, this will close the dialog after clicking the button:
Code: Select all
SLIDESHOW=$(yad --center --window-icon=/usr/local/lib/X11/pixmaps/qiv.png --title="Q.I.V Slideshow" --width=450 --text=" Please make your selections:-" \ --form --field="Choose image directory:-:MDIR" '/root' \ --field="Select timeout interval:-:NUM" "1" \ --buttons-layout=center --button="Run Q.I.V slideshow:0") echo $SLIDESHOW # total output, next will split DIR="`echo $SLIDESHOW | cut -d "|" -f 1`" TIMEOUT="`echo $SLIDESHOW | cut -d "|" -f 2`" qiv -s -f -i -d $TIMEOUT $DIR
Works for me, but probably can be more compact.
Code: Select all
--close-on-unfocus
I'll give this a whirl and let ya know the outcome, mate.
-------------------------------------------
@ MochiMoppel:-
Hah! Yup, 'Greek' is right, my son.....MochiMoppel wrote:Looks a bit ugly. Mike would call it "Greek".step wrote:Code: Select all
. . [ -n "$(echo -e)" ] && echo_e= || echo_e=-e # Use echo -e except with dash MULTILINE=$(echo $echo_e "$MULTILINE") # Convert '\n' in TXT field back into linefeeds echo $echo_e "$MULTILINE\n$TYPELESS\n$FONT\n$COLOUR"
Can't we forget echo -e and just use printf? Would this be an alternative and acceptable for dash?Code: Select all
printf %b "$MULTILINE\n$TYPELESS\n$FONT\n$COLOUR"
See, now this is where my lack of understanding comes back to haunt me. I understand that 'echo' gives a readout in the terminal.....but what's the difference between that and 'print'?
I have to confess, I'm all for simplicity at the best of times.....one of the nice things that's always differentiated Puppy from the mainstream distros (and 'the Other' ). Simple, elegant, economical code that achieves what's needed with the least resources expended.....one reason I like the '--close-on-unfocus' feature in the new versions of YAD. Saves needing to code exit stanzas!
Mike.