linuxshelluser-interfacevariables

YAD - working with a variable and file paths


I want to create one GUI window and from this interface, choose the path to files and set up parameters and then run the whole shell script.

My solution is:

files=$(zenity --file-selection --multiple --separator='' --title "Choose my files")

Export files

parameters=$(yad --width 500 --height 500 --title "Whole parameters" --form --field="Threshold1" --field="Threshold2" --field="Threshold3")

Then I can use those parameters in my other shell commands...

It is possible to create one GUI window and there choose the path to files, parameters and so on... And use those variables in my shell script?

Something like:

parameters=$(yad --width 500 --height 500 --title "Whole parameters" --file-selection --form --field="Threshold1" --field="Threshold2" --field="Threshold3")

Solution

  • Finally I found an answer... It could look like this:

    files=$(yad --width 800 --height 600 --title "GUI PROGRAM" \
        --form \
        --field="Laboratory:":RO "Laboratory" \
        --field="Memory:":NUM "VALUE[!2..64[!2]]" \
        --field="Click to select files":MFL "" \
        --field="Please Select Your Working Directory":DIR "C" \