You are not logged in.
Pages: 1
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?
Offline
Offline
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?
Offline
Small sample:
[code=test.sh]
#!/bin/bash
echo "$1"
echo "$2"
[/code]
Then add the following command in thunar-uca:
[code]test.sh '%F' '%N'[/code]
Offline
I don't understand, you mean add it to thunar-uca.la ?
Offline
No, add this command in the custom actions editor, that uses the bash script.
Offline
Pages: 1
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 532.75 KiB (Peak: 533.59 KiB) ]