Page 1 of 1
Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Thu Jan 31, 2019 6:45 pm
by manyroads
Since I have been putting a bunch of hours into creating/building my own Thunar Custom Actions, I thought I'd solicit comments from our Forums Community about what you have created/ use & like.
I posted a couple of my more recent creations here:
viewtopic.php?f=23&t=48279
I have a few more that I'll add once, I document their creation, for any who may benefit from these.
Re: Thunar Custom Actions--- what do you use & like
Posted: Thu Jan 31, 2019 9:20 pm
by skidoo
In case someone reading this topic hasn't yet discovered the Thunar Custom Actions feature,
here's a link to the xfce.org docs page:
custom-actions (
that xfce.org page is also linked from the MX Wiki)
Ubuntu wiki
ThunarCustomActions page provides 30 examples
PCLinuxOS magazine (PDF, Jan 2015) "
Xfce Tips And Tricks" describes several Thunar Custom Actions (dozens)
a nice collection here (not mine), with screenshots:
https://gitlab.com/nobodyinperson/thunar-custom-actions
Re: Thunar Custom Actions--- what do you use & like
Posted: Fri Feb 01, 2019 6:54 am
by Gaer Boy
I only make one change. I edit the Symlink Custom Action to:
Code: Select all
ln -s %f $(yad --width=640 --height=480 --center --file --directory --filename=%f --save --confirm-overwrite=oops)
Thanks to kmathern!
This makes it much easier to create my 20-odd data symlinks on installation.
Re: Thunar Custom Actions--- what do you use & like
Posted: Fri Feb 01, 2019 7:08 am
by Jerry3904
@skidoo: put the Ubu link in that Wiki entry--which really needs to be filled out one of these days...
Thunar Custom Actions--- Image Conversion Function(s)
Posted: Sun Feb 03, 2019 3:52 pm
by manyroads
Image Conversion Function(s)
The following Thunar Custom Actions require that you have imagemagick installed (easy to do with mxpi).
Here are the commands for each:
To Convert jpg to png; the action command is:
To Convert png to jpg; the action command is:
I have the Appearance conditions set for both identically, see the image below:
Appearance Conditions-Image Conversions.png
Thunar Custom Actions--- a better looking menu
Posted: Sun Feb 03, 2019 4:03 pm
by manyroads
Making a better looking Custom Action Menu
Because I have a lot of custom actions, and I like them organized here are a couple of 'tricks' to allow for grouping & sorting.
To create a separator with a label, simply mimic the following image; set the Appearance Conditions to all check marks. The lines is actually the dash from your keyboard.
Labelled Seperator.png
When you're done you will be able to do something nicer that I have.
As for the icons I use, I have a folder (collection) and they are simply set from the Custom Action editor screen. Keep them somewhere so you'll remember!!!!
Menu with Actions.png
Re: Thunar Custom Actions--- what do you use & like
Posted: Sun Feb 03, 2019 8:00 pm
by Buck Fankers
Just want to say how I like all the Custom Actions in Thunar that already comes with MX!
But yours @manyroads (and icons) looks great, I love it, it would be huge improvement if they would come already with MX Thunar. I bet there would be users pointing this out, how MX Thunar is so much better than in other distros.
Re: Thunar Custom Actions--- what do you use & like
Posted: Sun Feb 03, 2019 9:41 pm
by manyroads
Buck Fankers wrote: Sun Feb 03, 2019 8:00 pm
Just want to say how I like all the Custom Actions in Thunar that already comes with MX!
But yours @manyroads (and icons) looks great, I love it, it would be huge improvement if they would come already with MX Thunar. I bet there would be users pointing this out, how MX Thunar is so much better than in other distros.
@Buck Fankers I certainly am happy if people want to use what I create. It's all there for the taking.

Thunar Custom Action--- anti-virus Action
Posted: Mon Feb 04, 2019 9:07 am
by manyroads
Folder/File Virus scan
If you have clamav/clamtk installed (anti-virus available thru mxpi stable repo) you can create a custom action in thunar and make it invokeable on either single files or folders/ dirs. I find this especially useful for download of things such as Books, maps, images (pdf, png/jpg, etc.)
clam custom action.png
clam appearance conditions.png
Thunar Custom Action--- Bulk Rename
Posted: Mon Feb 04, 2019 9:29 am
by manyroads
If you wish to invoke the Bulk Rename functions for files/ folders via right-click make certain you first install:
Code: Select all
sudo apt-get install --no-install-recommends thunar
Also, in order to be able to batch rename multiple audio files based on their tags, also install the Thunar Media Tags plugin:
Code: Select all
sudo apt-get install thunar-media-tags-plugin
Edit the Thunar Custom actions as follows:
BulkRename Basic Action.png
BulkRename Appearance Condition.png
Re: Thunar Custom Actions--- what do you use & like
Posted: Fri Feb 15, 2019 8:31 pm
by Buck Fankers
skidoo wrote: Thu Jan 31, 2019 9:20 pm
In case someone reading this topic hasn't yet discovered the Thunar Custom Actions feature...
I have a question, do you happen to know, which file saves all these Thunar custom actions?
Edit: looks like it is this one: (will copy it to another computer to see if it is working)
/home/mx/.config/Thunar/uca.xml
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sat Feb 16, 2019 1:44 am
by skidoo
Yes, ~/.config/Thunar/uca.xml should work when copied to another computer, or to a different user's home.
Bear in mind that you may need to chown the ownership of the file in its new location, else user will be unable to edit it.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sat Feb 16, 2019 3:57 am
by JmaCWQ
Here's one I use regularly, Delete Immediately, deletes files/folders without the confirmation dialog appearing.
Be careful with it though, one miss click can cause an instant headache if all your unsaved work vanishes by mistake

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sat Feb 16, 2019 7:13 pm
by Buck Fankers
skidoo wrote: Sat Feb 16, 2019 1:44 am
Yes,
~/.config/Thunar/uca.xml should work when copied to another computer, or to a different user's home.
Bear in mind that you may need to chown the ownership of the file in its new location, else user will be unable to edit it.
Thank you!
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sat Feb 16, 2019 7:14 pm
by Buck Fankers
JmaCWQ wrote: Sat Feb 16, 2019 3:57 am
Here's one I use regularly, Delete Immediately, deletes files/folders without the confirmation dialog appearing.
Nice, will add it and attach big red 'stop' or similar icon just to be extra alerted ;-)
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sat Feb 16, 2019 8:41 pm
by oops
manyroads wrote: Thu Jan 31, 2019 6:45 pm
Since I have been putting a bunch of hours into creating/building my own Thunar Custom Actions, I thought I'd solicit comments from our Forums Community about what you have created/ use & like.
I posted a couple of my more recent creations here:
viewtopic.php?f=23&t=48279
I have a few more that I'll add once, I document their creation, for any who may benefit from these.
Hi,
Nice tuto ...
But I hope than Thunar will have like Nautilus, Nemo, Caja, an option to use some Thunar bash scripts ... it' that why I actually prefer Nemo (that's easier to build some scripts).
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sat Feb 23, 2019 9:11 am
by Brigs
Wow... nice tutor Thunar action here. i'll give share of mine action
Slug Filename : Rename the currently selected files, making the filenames lower-case & replacing spaces with dashes
Code: Select all
for file in %N; do mv "$file" "$(echo "$file" | tr -s ' ' | tr ' A-Z' '-a-z' | tr -s '-' | tr -c '[:alnum:][:cntrl:].' '-')"; done
Clean Meta Exif from image, required libimage-exiftool-perl
Code: Select all
xterm -e "exiftool -overwrite_original -all= %F; echo -n 'Press ENTER to continue...'; read"
Split .flac from .cue (u need only 1 .cue and 1 .flac with same name inside 1 directory), required cuetools
Code: Select all
xterm -e "shnsplit -f %f -t "%%n-%%p-%%a-%%t" -o flac *.flac; echo -n 'Press ENTER to continue...'; read"
Convert Dir to .iso udf image. required genisoimage (udf is .iso formatting that allow filesize more than 2gb)
Code: Select all
genisoimage -r -udf --allow-limited-size -o %f.iso %F | yad --progress --title="ISO Creation" --progress-text="Please wait ... File(s) being processed." --percentage=40 --auto-close --auto-kill
Extract mac dmg files to dir, sometimes i must working with mac .dmg compression image
Code: Select all
xterm -e "7z x %f; echo -n 'Press ENTER to continue...'; read"
Convert Flac to Alac (.m4a), never loose flac compression, alac work flawlessly with itunes
Code: Select all
xterm -e "ffmpeg -i %f -acodec alac %f.m4a; echo -n 'Press ENTER to continue...'; read"
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sat Feb 23, 2019 9:36 am
by manyroads
oops wrote: Sat Feb 16, 2019 8:41 pm
But I hope than Thunar will have like Nautilus, Nemo, Caja, an option to use some Thunar bash scripts ... it' that why I actually prefer Nemo (that's easier to build some scripts).
Many of those I mention are simply links to bash scripts...
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sat Feb 23, 2019 9:42 am
by manyroads
Brigs wrote: Sat Feb 23, 2019 9:11 am
Wow... nice tutor Thunar action here. i'll give share of mine action
Slug Filename : Rename the currently selected files, making the filenames lower-case & replacing spaces with dashes
Code: Select all
for file in %N; do mv "$file" "$(echo "$file" | tr -s ' ' | tr ' A-Z' '-a-z' | tr -s '-' | tr -c '[:alnum:][:cntrl:].' '-')"; done
I really like this one and made two out of it for my digital text libraries
Replace filename space with dash
Code: Select all
for file in %N; do mv "$file" "$(echo "$file" | tr -s ' ' | tr -s '-' | tr -c '[:alnum:][:cntrl:].' '-')"; done
Replace filename underscore with dash
Code: Select all
for file in %N; do mv "$file" "$(echo "$file" | tr -s '_' | tr -s ' ' | tr -c '[:alnum:][:cntrl:].' '-')"; done
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Mon Feb 25, 2019 4:30 am
by oops
manyroads wrote: Sat Feb 23, 2019 9:36 am
oops wrote: Sat Feb 16, 2019 8:41 pm
But I hope than Thunar will have like Nautilus, Nemo, Caja, an option to use some Thunar bash scripts ... it' that why I actually prefer Nemo (that's easier to build some scripts).
Many of those I mention are simply links to bash scripts...
Good news for me, so I have to learn and retry Thunar.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Mon Feb 25, 2019 6:03 pm
by manyroads
oops wrote: Mon Feb 25, 2019 4:30 am
Good news for me, so I have to learn and retry Thunar.
I am a huge fan of Thunar because of all the customization it allows.
Re: Thunar Custom Actions--- what do you use & like
Posted: Mon Feb 25, 2019 8:42 pm
by JayM
Gaer Boy wrote: Fri Feb 01, 2019 6:54 am
I only make one change. I edit the Symlink Custom Action to:
Code: Select all
ln -s %f $(yad --width=640 --height=480 --center --file --directory --filename=%f --save --confirm-overwrite=oops)
Thanks to kmathern!
This makes it much easier to create my 20-odd data symlinks on installation.
I've just stumbled upon this thread and edited my own symlink custom action to use the above. It's a lot easier than creating an automatically-named-for-you symlink that you then have to rename. I changed "oops" to "Overwrite?"
The only problem is that the cancel button also displays the "Overwrite?" warning and if I click No it cancels the cancellation, by which I mean that I expected that Cancel would close the yad GUI and cancel the ln -s action but clicking No at the Overwrite? prompt leaves me in that GUI. I've read the man page but haven't found anything that makes the cancel button work. I'm mentioning this in case someone who's more familiar with yad knows how to make cancel behave.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 19, 2019 4:01 am
by JayM
Encrypt a file using GPG:
Name: Encrypt
Description: Encrypt using GPG
Command: xfce4-terminal -x gpg -c %f
Appearance Conditions: select all
Decrypt a file using GPG:
Name: Decrypt
Description: Decrypt using GPG
Command: xfce4-terminal -x gpg -o %n-decrypted -d %f
Appearance Conditions: select all
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 19, 2019 7:54 am
by KoO
This my symlink action.
Name: Create symlink
Description: Symlink Here
Command: ln -s %f Link\ to\ %n
Directories, other files
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 19, 2019 9:16 am
by Huckleberry Finn
Ok, here's a hard question:
I've been trying to put
Duplicate
Invert Selection
Copy Path(s) (selected file(s) or the current directory on empty place)
to the right-click menu. Though Duplicate and invert s. are in the menu above, I wish there were keyboard shortcuts for them at least. (I tried Ctrl + i for invert s. but doesn't work)
So, I found and applied these, sadly they work only on text files, I don't know why:
Duplicate:
Code: Select all
for file in %F ;do cp "$file" "$file"_2 ;done
Copy Path (needs xclip installed):
Code: Select all
echo -n "${PWD}" | xclip -selection clipboard
________________
So, any other commands to make them work perfectly?
________________
P.S. Meanwhile, these are already in SpaceFM and PCmanFM but when I open to have a look at the commands, they're greyed out as "built-in command" :D I wish I could grab them. If Thunar had them,too , then would be perfect with all other handy features.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 19, 2019 10:31 am
by xali
about copying current path, for me
Code: Select all
echo -n %f | xclip -selection "clipboard"
works ok. You just have to tick on appearance conditions all choices and not only text files. file pattern = *
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 19, 2019 2:17 pm
by Huckleberry Finn
xali wrote: Fri Jul 19, 2019 10:31 amYou just have to tick on appearance conditions all choices and not only text files. file pattern = *
Ah yes, thank you so much :) I really feel stupid, I didn't even notice that tab :D
Now this works perfectly for one or several files & folders selected at once with %F:
Code: Select all
echo -n %F | xclip -selection clipboard
I also checked all file types for "Duplicate" and that's also ok now (but it works only for files, not directories with this command)
Now, just "Invert Selection" left ..
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 19, 2019 9:20 pm
by handy
Customization is why I've been using the Worker file manager for so many years. I expect that all of the years I used Jonathan Potter's "Directory Opus" (DOpus), on the Amiga's, must have programmed that kind of user IO interface into my subconscious? :)
Most people don't like Worker. I think that they think it requires too much learning & configuration right off the bat. I love the dynamism of configuration that it allows. Over the years I have just kept on modifying it to suit me, as new application & tools come out, or I have different hardware or distros/BSD's, or another purpose presents itself.
I'm currently running 4 different setups (it was 5, but my HDD that was running my OpenBSD install had its cable connector broken by removalists somewhere along the line? If the data was valuable, I could salvage that 1TB Hitachi drive, but it isn't worth it).
Worker has a lot of its own commands built in, & multiple ways of applying & targetting those commands. Way more than I will ever need to use or know how to use. That is apart from using Bash commands or batch files, alone or in combination & of course calling whatever application with any instructions you may have provided when setting it up to be called via a button or by a double click on a filetype that you have associated with it.
Anyway, here is a link to a wiki page I wrote about Worker:
https://wiki.manjaro.org/index.php?titl ... troduction
(I don't remember whether I've made that page available here in the tutorials of not. I expect not, as I wouldn't have been able to provide images here - I don't post them anywhere else but forums or wikis.)
Someone has recently been going through the Manjaro wiki & cleaning it up. Which is great. Big job. I don't know what other changes they had made to this particular wiki page, but they had removed two different images of the front end of Worker. OK, there probably only needed to be one, my intention was to give an example of the variety of ways that Worker can be configured. :)
Anyway, I just put an image of my MX Worker front end on the wiki so anyone who is interested can see a much better front end than you will see on Ralph Hoffman's Worker website (where only the default is shown I believe).
Beyond all that, the above is not posted by me as a "my directory utility is better than yours" type of thing. It is an acknowledgement of the joys of customisation & of the freedom of choice that using any one of the *nix based distros/OS's brings with it. :D
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 19, 2019 10:55 pm
by Richard
Thanks for the tut, Handy.
Going to give it another go.
Probably more useful for me on the netbook; although it's not getting much use these days,
but should be quicker on laptop, as well
Sorry, we got off topic a bit.
Now back to those wonderfully useful, TCAs
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Wed Aug 07, 2019 10:49 am
by Buck Fankers
Brigs wrote: Sat Feb 23, 2019 9:11 am
Clean Meta Exif from image, required libimage-exiftool-perl
xterm -e "exiftool -overwrite_original -all= %F; echo -n 'Press ENTER to continue...'; read"
This one didn't work for me. Got it working with this command: (cleans jpg, jepg, png and pdf, didn't try any other yet)
Code: Select all
exiftool -all= -overwrite_original * .
First I used one custom action for each format until I figured out, one command is all I need
Code: Select all
exiftool -all= -overwrite_original -ext jpg .
exiftool -all= -overwrite_original -ext png .
exiftool -all= -overwrite_original -ext jpeg .
Thanks for all your custom actions sharing!
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Wed Aug 07, 2019 10:54 am
by Buck Fankers
Anyone has any good compress image custom action code? I was using this one bellow in the terminal and looks like it is working as custom action also:
Code: Select all
for file in *.*; do convert $file -quality 10 compressed-$file; done
file pattern: *
Appears if selection contains: Directories & Image Files
install: imagemagick
This one works for compressing JPEG and JPG image files. I don't have anything for PNG files yet. I have read, that OptiPNG is good for compressing PNG files. Anyway I would be interested in anything you galls and guys may have

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Wed Aug 07, 2019 10:57 am
by Buck Fankers
For removing metadata from all kind of files, looks like MAT is the best choice:
http://xmodulo.com/remove-file-metadata-linux.html
Anyone has any custom action code already done with the mat?
Edit, scratch "all kind" part. mat-gui can't handle pdf or pictures. But it is useful for office document files, so still forth having it.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Wed Aug 07, 2019 5:12 pm
by Buck Fankers
Buck Fankers wrote: Wed Aug 07, 2019 10:54 am
I have read, that OptiPNG is good for compressing PNG files.
Looks like OptiPNG does two things, removes metadata and compresses the file. But works as name indicates only for PNG files.
Command: (works good as Thunar Custom Action)
Mat code is bellow, but mat is also quite limited. You can use this for Thunar Custom Action command:
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Thu Aug 08, 2019 5:50 pm
by Buck Fankers
Someone gave me ms office files and 'mat' didn't clean them, but it did clean ODS (Libre), so looks like 'mat' is not that useful.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Thu Aug 08, 2019 6:16 pm
by manyroads
I think you might want to open a thread on your topic Buck.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Aug 09, 2019 2:01 am
by Buck Fankers
manyroads wrote: Thu Aug 08, 2019 6:16 pm
I think you might want to open a thread on your topic Buck.
That is interesting. Apparently I still don't understand how this forum works. Was I off topic?
I posted few more custom actions and had few questions about them.
Is it better if 'thunar custom actions' posts are spread across different threads?
Anyway, will refrain from now on to post anything else in this one, no problem, just strange...
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Aug 09, 2019 9:26 am
by manyroads
Buck Fankers wrote: Fri Aug 09, 2019 2:01 am
manyroads wrote: Thu Aug 08, 2019 6:16 pm
I think you might want to open a thread on your topic Buck.
That is interesting. Apparently I still don't understand how this forum works. Was I off topic?
I posted few more custom actions and had few questions about them.
Is it better if 'thunar custom actions' posts are spread across different threads?
Anyway, will refrain from now on to post anything else in this one, no problem, just strange...
My comment was solely based on the fact that you seem enthusiastic about a particular issue that needs more visibility than it will get at page 4 of what is supposed to be listing of functionng thunar commands. Once you figure out what works, by all means add it.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Mon Oct 07, 2019 5:07 pm
by Srdjan
Could someone help me with this one:
Thunar Custom Action command from context menus:
When I select one or more files it will:
If just files (no folders)
1. Send one or more selected files as attachments on my own e-mail address
with current date as mail subject and "Backup" as mail body text.
If folders or folders + some files selected:
2. Compress all selected, give the that archive file name in format
current_date.tar.gz, and then send it as attachment on my e-mail address
with current date as mail subject and "Backup" as mail body text.
Context menu item should be titled "Backup selection on my e-mail"
Preferably is should use some light terminal mail tool which is already
installed on MX (if there is one) to perform sending mail.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Mon Oct 07, 2019 9:23 pm
by skidoo
Have you considered crafting a solution utilizing SendTo ?
https://docs.xfce.org/xfce/thunar/send-to
...Thunar also ships the
thunar-sendto-email plugin, which adds the entry Mail Recipient to the menu.
This feature opens the default mail composer with the selected files attached to a new email.
If the selection contains at least one folder, the selected items are automatically added to a ZIP archive before attaching them to the email.
If the selection contains multiple files, or a single file which is larger than 200 Kib, the user will be prompted whether to pack the files into a ZIP archive or attach them to the message as uncompressed, individual files.
Like most other features of Thunar, the Send To menu can be easily extended by users and application developers with new targets, using standard desktop entry files. These files must be installed into one of the $XDG_DATA_DIRS/Thunar/sendto/ folders (see the XDG Base Directory Specification for details about the $XDG_DATA_DIRS variable).
The targeted email client (perhaps one different from your "daily driver") can probably be configured to automatically apply a default template (title: YY/MM/DD backup) and you may discover it will often be desirable to have the option to add other notes-to-self into the message body. Also, once the mail client has been triggered via an initial SendTo operation, you'll be free to browse across directories and drag-n-drop further cherrypicked files.
As for the compression, you can Ctrl+ select a group of files within Thunar, then create new archive, then SendTo the newly-created archivefile. A custom action for THIS step might be desirable, one which will both create an archivefile and copy-to-clipboard a manifest of the selected filenames (which you would manually paste into email message body)(remember, it might be desirable to attach multiple archive and/or individual files to a single email)
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Tue Oct 08, 2019 9:05 am
by Srdjan
The targeted email client (perhaps one different from your "daily driver") can probably be configured to automatically apply a default template (title: YY/MM/DD backup) and you may discover it will often be desirable to have the option to add other notes-to-self into the message body. Also, once the mail client has been triggered via an initial SendTo operation, you'll be free to browse across directories and drag-n-drop further cherrypicked files.
The thing is that I would like it to work exactly as described, no need for further picking, files, directories, editing mail body...
so just this exactly:
1. Send one or more selected files as attachments on my own e-mail address
with current date as mail subject and "Backup" as mail body text.
If folders or folders + some files selected:
2. Compress all selected, give the that archive file name in format
current_date.tar.gz, and then send it as attachment on my e-mail address
with current date as mail subject and "Backup" as mail body text..
If someone know one-liner (a bit more complex I don't know how to write it) that could be put in Thunar Context menu to do this, I would appreciate it :)
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sun Dec 15, 2019 6:40 pm
by oops
xali wrote: Fri Jul 19, 2019 10:31 am
about copying current path, for me
Code: Select all
echo -n %f | xclip -selection "clipboard"
works ok. You just have to tick on appearance conditions all choices and not only text files. file pattern = *
... Or with xsel (already into MX)
manyroads wrote: Sat Feb 23, 2019 9:42 am
Brigs wrote: Sat Feb 23, 2019 9:11 am
Wow... nice tutor Thunar action here. i'll give share of mine action
Slug Filename : Rename the currently selected files, making the filenames lower-case & replacing spaces with dashes
Code: Select all
for file in %N; do mv "$file" "$(echo "$file" | tr -s ' ' | tr ' A-Z' '-a-z' | tr -s '-' | tr -c '[:alnum:][:cntrl:].' '-')"; done
I really like this one and made two out of it for my digital text libraries...
I like this one too, but does not work if the name starts with a space.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Sun Dec 15, 2019 8:07 pm
by KoO
JmaCWQ wrote: Sat Feb 16, 2019 3:57 am
Here's one I use regularly, Delete Immediately, deletes files/folders without the confirmation dialog appearing.
Be careful with it though, one miss click can cause an instant headache if all your unsaved work vanishes by mistake
This is not needed anymore as from 1.8.2 their is an option in preferences>Behavior> show action to permanently delete files and folders (checkbox) and you get a popup asking are you sure.
https://www.youtube.com/watch?v=5wZ85j9 ... e=emb_logo
But the strange thing is that on my system with 1.8.4 this opposition is not present BUT it still works as does the popup and it is in the dropdown menu. Maybe because I have been using the same config folder for a long time now. I don't care at all it works.
One thing if you open accles.scm file this opposition is in the list = ; (gtk_accel_path "<Actions>/ThunarStandardView/delete" "") your custom action are stored in uca.xml file. Link to both files .config/Thunar
A couple of my favorite customs.
---------
Edit with root geany
gksu geany %f
text files
-------
Catfish
catfish %f
all files and directory's
-------
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Mon Dec 16, 2019 5:48 am
by JmaCWQ
My way removes the popup asking are you sure, which was the intention of it.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Mon Dec 16, 2019 6:35 am
by KoO
JmaCWQ wrote: Mon Dec 16, 2019 5:48 am
My way removes the popup asking are you sure, which was the intention of it.
If their was one popup I would like to keep it is that one. But thanks for the info..
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Tue Dec 17, 2019 1:34 am
by JmaCWQ
KoO wrote: Mon Dec 16, 2019 6:35 am
If their was one popup I would like to keep it is that one. But thanks for the info..
No probs
In some ways I agree with you, that popup can be a saviour, especially on a miss-click where you click that command by mistake.
I found that out the hard way a few years ago when I was only half paying attention and clicked it by accident on the Desktop.
Not only did it delete everything on the Desktop but it also started to delete any folders that had links/shortcuts on the Desktop as well
Luckily some of them were many GB in size & the Delete dialog alerted me to what was happening so I cancelled it, still lost quite a bit though.
Now I am very careful when deleting with that command, especially on the Desktop, I do like the fact that it's right click>Delete without having to move the mouse to the screen centre to click Delete on the popup each time.
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Thu Jan 30, 2020 6:31 pm
by KoO
Found a handy thunar custom action today for me anyway. Music is my World
thunar-custom-actions = (thunar-media-info.sh)
https://github.com/cytopia/thunar-custo ... ia-info.sh
Dependence = zenity (for gui mode - default) and or ffmpeg (for cli)
Command: ~/bin/thunar-media-info.sh -f %f -t %n <<<<< I changed the install location to .scripts so my command is = ~/.scripts/thunar-media-info.sh -f %f -t %n
# File Pattern: *
# Appear On: Audio Files, Video Files

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jan 31, 2020 1:33 pm
by oops
To Add “delete confirmation prompt” in Thunar (with yad by default into MX) & ("Suppr" key too)
Command:
Code: Select all
yad --image dialog-question --center --on-top --width="400" --height="200" --title Alert --button=gtk-no:1 --button=gtk-yes:0 --text "Delete with confirmation prompt %N ?" && gvfs-trash %F
or
French Command:
Code: Select all
yad --image dialog-question --center --on-top --width="400" --height="200" --title Alert --button=gtk-no:1 --button=gtk-yes:0 --text "Mettre à la corbeille %N ?" && gvfs-trash %F
# shortcut key = Suppr
# File Pattern: *
# Appear On: All
NOTA: It is useful for kinds (or old people) and all people, and without the confirmation, it is very dangerous if you have in the same time "mx-cleanup" with the automatic option auto-clean.
IMHO should be the default behavior for Thunar (like most file browsers did).
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 31, 2020 12:09 pm
by Duliwi
With "Thunar Custom Actions" we can add functional entries to the dialog box that appears when we right-click on a file in thunar.
Is there also a similar possibility for the "save as" window:
Speichern Dialog.png
?
What "Custom Actions" would I like to add into the "save as" window?
1. fast renaming a file, that already exists and is visible in this window
2. adding meta-tags to the file I am saving when this window is open
Re: Tutorial(s): Thunar Custom Actions--- simplify what you do
Posted: Fri Jul 31, 2020 12:50 pm
by dolphin_oracle
Duliwi wrote: Fri Jul 31, 2020 12:09 pm
With "Thunar Custom Actions" we can add functional entries to the dialog box that appears when we right-click on a file in thunar.
Is there also a similar possibility for the "save as" window:
Speichern Dialog.png
?
What "Custom Actions" would I like to add into the "save as" window?
1. fast renaming a file, that already exists and is visible in this window
2. adding meta-tags to the file I am saving when this window is open
"save as" is not Thunar. They only look the same because they use the gtk toolkit to build the gui.
so no, you cannot use thunar custom actions in the "save as" dialog
depending on the app, some do let you do basic functions like rename, but that is a function of the particular app and not system wide.