Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-06-13 14:20:01

nobodyinperson
Member
From: Hamburg, Germany
Registered: 2017-06-13
Posts: 10
Website

System-wide Thunar custom actions

Since there doesn't seem to be a possiblity to define system-wide (like in "that apply to every user") Thunar custom actions, I wrote something to achieve that.

Github/nobodyinperson/thunar-custom-actions

It started as a simple XML merger to merge the system-wide Thunar custom actions into each user's Thunar configuration without touching the actions that were there before, but evolved into a pretty decent set of M4 macros that enables quick setup of sophisticated custom actions.

Features:

  • ensure all needed software is present, e.g. on configuration migration or system reinstallation

  • ensure nonexistent files don't get accidentally overwritten

  • ensure a broken or failing action command does not accedentally delete files

  • indicate progress on long-running actions

  • be able to interrupt an action

  • warn if an action failed

  • provide translations

  • maintenance: be able to apply changes to all actions at once

With these features (at this time of writing) actions are available for:

  • rotating images

  • shrinking images

  • grayscaling images

  • filling transparent areas in images with a given color

  • converting images to an A4 multi-page PDF document

  • concatenating PDF documents into one

  • shrinking PDF file sizes

  • de/encrypting arbitrary files with GPG

  • finding big elements in a folder

  • creating symbolic links to files

  • showing checksums (MD5,SHA1,SHA256) of files

Debian packages are available as well as the autoconf way of installation with configure and make.


System-wide, easy to install, sophisticated Thunar custom actions

Offline

#2 2017-06-14 14:15:30

Clio
Member
Registered: 2011-01-25
Posts: 102

Re: System-wide Thunar custom actions

Many thanks for the excellent work. Functions perfectly!

Vielen Dank für die hervorragende Arbeit, insbesondere aber für die Verknüpfung!
Die Standardaktion läßt ja zu wünschen übrig, ich hatte diese zwar nochmal geändert, aber mit Zenity war es mir doch zu umfangreich.
Jetzt ist es perfekt.

Offline

#3 2017-06-14 14:53:49

nobodyinperson
Member
From: Hamburg, Germany
Registered: 2017-06-13
Posts: 10
Website

Re: System-wide Thunar custom actions

Very glad to hear that :-)

[ I think I will stick to English so everyone here can understand it :-D ]

Has there ever been a pre-defined action shipping with Thunar for creating symbolic links? :-O
I was not aware of that. I only have predefined actions for searching and opening a terminal in a folder.


System-wide, easy to install, sophisticated Thunar custom actions

Offline

#4 2017-06-14 15:37:16

Jerry3904
Member
Registered: 2013-11-09
Posts: 863

Re: System-wide Thunar custom actions

There's one in the Xfce documentation, but I don't know if it ever shipped with the app (though we include it): http://docs.xfce.org/xfce/thunar/custom-actions


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#5 2017-06-14 21:11:08

nobodyinperson
Member
From: Hamburg, Germany
Registered: 2017-06-13
Posts: 10
Website

Re: System-wide Thunar custom actions

@Clio: I just enabled creating links also to directories, not only files. That wasn't possible before. The next release version v0.0.15 will include this.

Just out of curiosity, may I ask how you installed thunar-custom-actions?

  • debian package from the releases page

  • my apt repository

  • old-fashioned way configure - make - make install

    • from source tarball

    • from cloned git repository


System-wide, easy to install, sophisticated Thunar custom actions

Offline

#6 2017-06-15 11:32:12

nobodyinperson
Member
From: Hamburg, Germany
Registered: 2017-06-13
Posts: 10
Website

Re: System-wide Thunar custom actions

v0.0.15
  • less aggressive PDF compression on reduce PDF size action

  • allow creating links to directories in create symbolic link action

  • add asymmetric GPG en/decryption actions

There is now a minor drawback: Decrypting multiple symetrically encrypted files now prompts for the password on every file. This was necessary to easily integrate asymmetrical de/encryption. Now both can be mixed on decrypting action.

Screenshots

asymmetric GPG encryption in Thunar context menu

Recipient's public key selection (based on gpg2 --list-public-keys):

Recipient public key selection

Last edited by nobodyinperson (2017-06-15 11:33:22)


System-wide, easy to install, sophisticated Thunar custom actions

Offline

#7 2017-06-15 11:51:30

Clio
Member
Registered: 2011-01-25
Posts: 102

Re: System-wide Thunar custom actions

@nobodyinperson

I've it from git repo and compiled on my Testsystem (Debian Sid), than I add the action "Symlink" in .config/Thunar/uca.xml.
My other actions are unchanged.

nobodyinperson wrote:

...I just enabled creating links also to directories, not only files. That wasn't possible before...

This is also now already, if you select directory on the second page.

Offline

#8 2017-06-15 11:57:51

nobodyinperson
Member
From: Hamburg, Germany
Registered: 2017-06-13
Posts: 10
Website

Re: System-wide Thunar custom actions

Clio wrote:

This is also now already, if you select directory on the second page.

Yes, I actually just forgot to include that in the xml files before :-) Now it's there.


System-wide, easy to install, sophisticated Thunar custom actions

Offline

#9 2017-06-15 12:03:11

nobodyinperson
Member
From: Hamburg, Germany
Registered: 2017-06-13
Posts: 10
Website

Re: System-wide Thunar custom actions

Clio wrote:

I've it from git repo and compiled on my Testsystem (Debian Sid), than I add the action "Symlink" in .config/Thunar/uca.xml.
My other actions are unchanged.

Okay so you were just interested in the create symlink action? I am still elaborating on a system to allow users merging only specific custom actions provided by thunar-custom-actions into their configuration, not all at once, like

uca-apply update

does. Because I can imagine that people won't always want all of the actions I wrote.


System-wide, easy to install, sophisticated Thunar custom actions

Offline

#10 2017-06-17 18:18:19

nobodyinperson
Member
From: Hamburg, Germany
Registered: 2017-06-13
Posts: 10
Website

Re: System-wide Thunar custom actions

Version v0.0.16 comes with better error handling for GNUPG actions:

  • let gnupg crate its missing configuration directory if necessary

  • start gpg-agent if necessary

  • warn and stop if there are no public keys available on asymmetric encryption

Also, converting to PDF now asks for the output PDF's orientation:

27255107-6dc82fda-5397-11e7-8b0a-2364b1f528da.png


System-wide, easy to install, sophisticated Thunar custom actions

Offline

#11 2017-06-18 14:17:17

nobodyinperson
Member
From: Hamburg, Germany
Registered: 2017-06-13
Posts: 10
Website

Re: System-wide Thunar custom actions

Version v0.0.18 adds an action to convert images to arbitrary formats:

27261299-c54197ca-5440-11e7-8f68-1400121caa41.png
27261296-c51790ec-5440-11e7-818b-6be989a0cf3b.png


System-wide, easy to install, sophisticated Thunar custom actions

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 588.78 KiB (Peak: 605.63 KiB) ]