echo "$DirName" | Record=(`yad --list ... `)Record=(`yad --list ... `) <<< "$DirName"Record=(`yad --list --radiolist --separator="|" --grid-lines=hor \
--title="bafman - Born Again File Manager - $DirCnt Directories" \
--text="Navigate to directory and double-click or space bar to use:\
Tag files / Edit comments / Hide Dir buttons." \
--width=1200 --height=800 --center --no-markup \
--button="Tag files":$ButnTag --button="Run command":$ButnCommand \
--button="Edit comments":$ButnComment \
--button="Add Dir":$ButnAdd --button="Hide Dir":$ButnHide \
--button="Update Dirs":$ButnUpdate --button="$VariableCloseText":$ButnCancel \
--button="Save":$ButnSave \
--wrap-width=800 --wrap-cols=2 --dclick-action \
--ellipsize=START --ellipsize-cols=8 \
--search-column=2 --column "Select" \
--column "Searchable Directory Name (just start typing)" \
--column "Modified":HD --column "Owner":HD --column "Status":HD \
--column "File Cnt":NUM --column "File Sizes":SZ --column "Comment...":TXT \
--column "Tag Cnt":NUM --column "Tag Sizes":SZ \
"${DirsArr[@]}"`)
Action=$?
#!/bin/bash
test -e /tmp/yadpipe03 && rm -f /tmp/yadpipe03
# Named pipe initialization
export PIPE_03=/tmp/yadpipe03
mkfifo $PIPE_03
exec 3<> $PIPE_03
function load_data
{
DIRS="$(yad --file --multiple --width=800 --height=600 \
--directory --title="Select Folders")"
OIFS=$IFS
IFS="|"
[[ ! -z "$DIRS" ]] && YAD_DATA=($(for DIR in "$DIRS";do echo "$DIR";done ))
IFS=$OIFS
for DATA in "${YAD_DATA[@]}";do
echo True # Adds "True" for the checklist column
echo "${DATA}"
done
}
export -f load_data
function clear_all
{
echo -e '\f'
}
export -f clear_all
# Main Dialog
Record=($(yad --list --checklist --separator="|" --grid-lines=hor \
--width=1200 --height=800 --center \
--title="Nafman - Not Again File Manager" \
--text="Example" \
--column "Select" --column "Folder" \
--button="Add Folders!gtk-add":'bash -c "load_data > $PIPE_03"' \
--button="Clear!gtk-clear":'bash -c "clear_all > $PIPE_03"' \
--button="OK!gtk-ok":0 \
--listen --print-all < $PIPE_03))
Action=$?
echo ${Record[@]}