nobodyinperson/thunar-custom-actions

Revise tempfile system

nobodyinperson opened this issue · 0 comments

Some commands don't need a tempfile for caching the output (e.g. if they don't overwrite the oroginal file but create a new file or if the output file would be very large).

The m4 macros should be reorganised to allow not using a tenpfile in a flexible way.

Proposal:

  • Introduce TUCA_CMD
    • which is wrapped around the whole command
    • does basic initialisation like TUCA_INIT
    • takes the command as argument
    • takes another argument to switch tempfile usage on/off
      • defining a TUCA_LOOP_FILETMP_VAR if a tempfile is desired
      • other progress-indicating macros like TUCA_LOOP and TUCA_WAIT should then use the tempfile accordingly or not