Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-06-08 16:40:19

CwF
Member
Registered: 2018-01-28
Posts: 285

Unified Thunar Custion Action - using tcl/tk?

I have a recent fascination with tcl/tk. While bringing an interface to life to control hauppage tv tuners that works well replacing a genmon/gxmessage/zenity widget, it occurred to me to do the same for as many Thunar custom actions as possible.

While I wouldn't recommend the solution as tight and light or as a better alternative to gxmessage/zenity/yad, for me it is! So for * pattern and all appearance conditions I have ONE custom action:

wish /usr/local/bin/herder.tk $(echo %f)

The echo seems necessary since tcl seems to receive thunar passed variables in quotes that contaminate parsing the path within. The display of the resulting tcl/tk dialog is conditional on this parsing and simplifies the right click menu, while unfortunately adding a click to simpler functions that once had a unique custom action.

Since there really isn't a limit on how much I can stuff into this unified custom action widget I have come up with some odd questions!

One question is the file monitoring of an app like mousepad (since 4.14?) that prevents multiple instances of a single file to be oblivious to external modification. Perhaps poor technique, herder.tk utilizes a single text area for display with an option to open in mousepad. This text is written to a temp file that mousepad opens. This single temp file is overwritten by any function herder.tk performs. If one step benefits from an export to mousepad, and further action changes this file, then an open mousepad will ask to reload this externally altered file.
So, is there a command line option to divorce mousepad from this file monitor?
I tried --disable-server but that's not it.

Another desire is to utilize existing dialogs indirectly. Primarily Thunar's Properties dialog and more specifically sub tabs like Audio. Any command line options for this?

  This would be a shortcut for editing Audio tags since that dialog works fine. I have implemented video tagging into the widget if spawned from a video file. It would be nice if thunar's property dialog also had a Video tab for mpeg/iTune atoms. The Audio tag dialog does work for mpeg4 audio files, so the function should work for mpeg4 video, maybe...

Offline

#2 2023-06-08 22:28:00

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,888

Re: Unified Thunar Custion Action - using tcl/tk?

CwF wrote:

One question is the file monitoring of an app like mousepad (since 4.14?) that prevents multiple instances of a single file to be oblivious to external modification. Perhaps poor technique, herder.tk utilizes a single text area for display with an option to open in mousepad. This text is written to a temp file that mousepad opens. This single temp file is overwritten by any function herder.tk performs. If one step benefits from an export to mousepad, and further action changes this file, then an open mousepad will ask to reload this externally altered file.
So, is there a command line option to divorce mousepad from this file monitor?
I tried --disable-server but that's not it.

There is an option to disable file monitoring in Preferences > File. I believe it was added in version 0.5.2 (not sure though).

Another desire is to utilize existing dialogs indirectly. Primarily Thunar's Properties dialog and more specifically sub tabs like Audio. Any command line options for this?

This dialog is provided by thunar-media-tags-plugin - depending on your distro, you might be able to remove that package.The Image tab is provided by the thunar-apr plugin which can be disabled at build time (instructions at that link).

It would be nice if thunar's property dialog also had a Video tab for mpeg/iTune atoms.

You could code a thunarx plugin for video properties using the thunarx framework and that would be added to thunar for this functionality.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-06-08 23:36:12

CwF
Member
Registered: 2018-01-28
Posts: 285

Re: Unified Thunar Custion Action - using tcl/tk?

ToZ wrote:

There is an option to disable file monitoring in Preferences > File. I believe it was added in version 0.5.2 (not sure though)..

I did find it in 0.5.10. Thank you.

This dialog is provided by thunar-media-tags-plugin - depending on your distro, you might be able to remove that package.

Opposite idea, I want to utilize it, but indirectly means the context click in thunar opens herder.tk with its dialog utilizing other utilities. If I then would like to edit the tag by invoking thunar-media-tags-plugin dialog from my herder.tk

I'm always on Debian.
Thanks for the pointers.

Offline

#4 2023-06-08 23:52:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,888

Re: Unified Thunar Custion Action - using tcl/tk?

CwF wrote:

Opposite idea, I want to utilize it, but indirectly means the context click in thunar opens herder.tk with its dialog utilizing other utilities. If I then would like to edit the tag by invoking thunar-media-tags-plugin dialog from my herder.tk

I don't see how or can't think of a way to do this. The call to that dialog is hard-coded in thunar.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB