Page 5 of 5
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.