I am trying to make a simple custom action for thunar that lets me select files to compress and then select an output file and location to save to.
I have a custom action which just compresses to the directory of the selected files with a progress notification (or at least a notification, it doesn't seem to progress too well).
7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on %n.7z %N | zenity --progress --text=Compressing --percentage=0 --auto-kill
Now as a custom action to select the output file
zenity --file-selection --filename=%f.7z --save --confirm-overwrite && 7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on %d/%n.7z %N | zenity --progress --text=Compressing --percentage=0 --auto-kill
This naturally doesn't work right, it just runs the zenity file selection, and the actual compression as unrelated commands.
Is there a simple way to link these two in one line, like with a command, so it can be used for the custom action?
I thought of that but I'm not too experienced with bash scripts either so how could I reference the %F in a script to what thunar is doing?
I don't understand, you mean add it to thunar-uca.la ?