Works, but it doesn't do what I want.
I have a script which selects files from a print queue and then prints them. Normally, there will be more than a handful of files and if I want to be selective, I have to check or uncheck more than a few one by one (depending on whether I start them out as all checked or all unchecked.) The file select lets me do all sorts of cool stuff with my mouse like selecting a block. So, I still would like a files only option for it.
As a separate, related question: the next script in the sequence allows deleting of files (presumably after they have been printed). I would like to pass it the list of files that were just printed. I've been experimenting with --file-filter, but so far I'm doing something wrong (FILES ends up empty.).
FILTERS=""
for FILE in "$@"
do
FILTERS="${FILTERS} --file-filter=\"${FILE}\""
done
## get file selection(s) from yad separated by vbars in a string
FILES=$(yad --title "Select Print Files to Delete" --width=400 --height=500 --file-selection --multiple --filename="$HOME/pq/" ${FILTERS})
Maybe the whole FILTERS string is getting treated as a single parameter and I have to do a dance with eval or something similar like building the whole command in a string.
This brings up another issue (hijacking my own thread yet again). I use AutoKey and one of the cool things they have is a website/blog where people can submit working examples for others to use and learn from. It would be great if yad had something like that. I'm just starting to experiment with several features and I really don't want to have to distract the main developer with a bunch of questions, many of which might be answered just by looking at some working examples.