Tutorial(s): Thunar Custom Actions--- simplify what you do

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
oops
Posts: 1913
Joined: Tue Apr 10, 2018 5:07 pm

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#41 Post 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)

Code: Select all

echo -n %f | xsel -b
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.
Last edited by oops on Mon Dec 16, 2019 4:53 am, edited 1 time in total.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 12:21 am

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#42 Post 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.

Image


Image


Be careful with it though, one miss click can cause an instant headache if all your unsaved work vanishes by mistake :sad:
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

-------
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
JmaCWQ
Posts: 282
Joined: Fri Sep 09, 2016 4:42 am

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#43 Post by JmaCWQ »

KoO wrote: Sun Dec 15, 2019 8:07 pm 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
My way removes the popup asking are you sure, which was the intention of it.

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 12:21 am

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#44 Post by KoO »

JmaCWQ wrote: Mon Dec 16, 2019 5:48 am
KoO wrote: Sun Dec 15, 2019 8:07 pm 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
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..
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
JmaCWQ
Posts: 282
Joined: Fri Sep 09, 2016 4:42 am

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#45 Post 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 :cool:
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 :frown:
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.

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 12:21 am

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#46 Post 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

Image
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
oops
Posts: 1913
Joined: Tue Apr 10, 2018 5:07 pm

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#47 Post 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).
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#48 Post 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
You do not have the required permissions to view the files attached to this post.

User avatar
dolphin_oracle
Developer
Posts: 22270
Joined: Sun Dec 16, 2007 12:17 pm

Re: Tutorial(s): Thunar Custom Actions--- simplify what you do

#49 Post 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.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

Post Reply

Return to “Tips & Tricks by users (not for help)”