You are not logged in.
Hello.
I want to create a Custom Action in Thunar that is only available for a file ending with a T followed by 2 arbitrary numbers (examples: abcT01, xh24gsdtT76…).
I unsuccessfully tried to introduce the file pattern T[0-9][0-9]$ (or T[0-9][0-9], T[0-9]{2}$, T[0-9]{2}) in the Appearing Conditions window.
Is it possible, and does anyone have an idea of how to proceed?
Thank for your help.
Aqua
Offline
I don't believe thunar custom actions supports regex in the Appearance Conditions - its just simple file extensions it supports. You'll have to move the logic into the script that is run when the custom action is executed - checking for the pattern in the script. Something like:
if echo "$1" | grep -qE 'T[0-9][0-9]'; then
### do something to the file
fi
Unfortunately, this custom action will appear on all files that meet the appearance (extension) pattern.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Hello Toz.
Thank you very much for taking the time to review and respond to my request.
I followed your advice, and everything is working well for checking the pattern of the input file afterwards.
Aqua
Offline
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 541.45 KiB (Peak: 551.17 KiB) ]