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
manyroads
Posts: 2624
Joined: Sat Jun 30, 2018 6:33 pm

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

#21 Post by manyroads »

oops wrote: Mon Feb 25, 2019 5: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.
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken

User avatar
JayM
Qualified MX Guide
Posts: 6793
Joined: Tue Jan 08, 2019 4:47 am

Re: Thunar Custom Actions--- what do you use & like

#22 Post by JayM »

Gaer Boy wrote: Fri Feb 01, 2019 7: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.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
JayM
Qualified MX Guide
Posts: 6793
Joined: Tue Jan 08, 2019 4:47 am

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

#23 Post 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
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

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

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

#24 Post by KoO »

This my symlink action.

Name: Create symlink
Description: Symlink Here
Command: ln -s %f Link\ to\ %n

Directories, other files
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)

Huckleberry Finn

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

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

xali
Posts: 96
Joined: Wed Dec 28, 2016 6:14 am

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

#26 Post 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 = *

Huckleberry Finn

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

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

User avatar
handy
Posts: 611
Joined: Mon Apr 23, 2018 2:00 pm

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

#28 Post 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
1_MSI: MAG B560 TORP', i5, RAM 16GB, GTX 1070 Ti 12GB, M2 238GB + USB, MX-23 Fb to Openbox
2_Lenovo: Ideapad 520S, i5, RAM 8GB, GPU i620, HDD 1TB, MX-21 - Openbox
3_Clevo: P150SM-A, i7, RAM 16GB, nVidia 8600, 2x 1TB HDD & M.2 256 GB, MX-21 - Openbox

User avatar
Richard
Posts: 1577
Joined: Fri Dec 12, 2008 10:31 am

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

#29 Post 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
Thinkpad T430 & Dell Latitude E7450, both with MX-21.3.1
kernal 5.10.0-26-amd64 x86_64; Xfce-4.18.0; 8 GB RAM
Intel Core i5-3380M, Graphics, Audio, Video; & SSDs.

User avatar
Buck Fankers
Posts: 744
Joined: Sat Mar 10, 2018 9:06 pm

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

#30 Post by Buck Fankers »

Brigs wrote: Sat Feb 23, 2019 10: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 :happy:

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!

Post Reply

Return to “Tips & Tricks by users”