Only these... message & ok_message & alert_message question text input menu & list fselect & dselect wait_seconds & wait_for & terminate_wait_for progress adjust Want know more on easybashgui functions ?
(1) = "0" exit status is "YES", "1" exit status is "NOT", other exit codes you should make program exit : normally in a script you have just to check exit status to know user choice ; (2) = "text" function writes text from STDIN to file "${dir_tmp}/${file_tmp}" and (only for kdialog, zenity, and Xdialog) you can also edit it ; (3) = "wait_for" function creates a window with a text, then returns control to main program... after the job, you would close the window throught function called "terminate_wait_for" ; (4) = take care that if you are in "console mode" or without X, throught cdialog, selection is done by SPACE key, and not by enter key ; (5) = "menu" function allows only one item selected; on the contrary "list" allows multiple choices and with "+" or "-" you can tell it to display them already selected or not; Examples: 1) question "Do you like Contry music ?" answer="${?}" if [ ${answer} -eq 0 ] then ok_message "You do like it :)" elif [ ${answer} -eq 1 ] then alert_message "You don't like it :(" else ok_message "See you..." exit 0 fi 2) echo -e "What's your name?\n\nMy name's:\nVittorio" | text 3) wait_for "I'm sleeping 4 seconds... good night..." sleep 4 terminate_wait_for 4) fselect file="$(0< "${dir_tmp}/${file_tmp}" )" 5) input 1 "(write here IP address)" && ip_address="$(0< "${dir_tmp}/${file_tmp}" )" input 3 "Username" "root" "IP address" "192.168.0.1" "Destination directory" "/tmp" IFS=$'\n' ; choices=( $(0< "${dir_tmp}/${file_tmp}" ) ) ; IFS=$' \t\n' user="${choices[0]}" ip="${choices[1]}" dir="${choices[2]}" 6) adjust "Please, set Volume level" 150 230 400 volume_to_set="$(0< "${dir_tmp}/${file_tmp}" )" 7) for i in 13 27 31 35 40 53 57 63 70 82 83 96 100 do echo "${i}" sleep 2 done | progress "This is a test progress depending on percent in StdIn..." for char in A B C do echo "PROGRESS" sleep 2 done | progress "This is a test progress depending on loop \n (you need an other argument: 3)..." "3" # see next example... 8) women=( Angela Carla Michelle Noemi Urma Marisa Karina Anita Josephine Rachel ) for (( index=0 ; index < ${#women[@]} ; index++ )) do today_woman="${women[${index}]}" kiss "${today_woman}" # # Job done !! # then -> echo "PROGRESS" # done | progress "This is a _LOVE_ progress..." "${#women[@]}" Mmmmh... I liked last example... eh,eh... ;-) |