Page 1 of 1

Middle truncation toggle?

Posted: 08 Jul 2020 19:43
by Kucera
Hello,
middle truncation comes extremely handy to me, but to make it even more useful, would like to have Custom Toolbar Button, to be able to quickly switch to and from the truncation. Is there a #xxx command that I could use to (hopefully) make me one, or would anyone have a script solution?
Regards Emil

Re: Middle truncation toggle?

Posted: 08 Jul 2020 23:49
by nas8e9
Scripting has a

Code: Select all

setting
command which supports a subset of XYplorer's settings, but not Truncate filenames in the middle.

There is no command ID for this setting, unfortunately.

Re: Middle truncation toggle?

Posted: 10 Jul 2020 00:06
by mazot
Here is a little script which maybe what you are looking for.
Only drawback it has to do a restart ,on my m/c takes approx 5 secs.
MidTruncate.xys
(249 Bytes) Downloaded 128 times

Re: Middle truncation toggle?

Posted: 10 Jul 2020 22:45
by admin
Thanks for the script! :tup:

When the 64-bit version is finished, remind me to add this feature. I like it.

Re: Middle truncation toggle?

Posted: 12 Jul 2020 22:29
by mazot
Was interested by viewtopic.php?f=3&t=21944&sid=420b1aba0 ... 12f346d065 found that toggle only works on 'Name' column

Re: Middle truncation toggle?

Posted: 15 Aug 2020 15:54
by admin
Next version:

Code: Select all

    + Scripting got a new command.
      Name: MiddleTruncation
      Action: Sets middle truncation in the Name column of the file list.
      Syntax: middletruncation [value]
        value   0 = turn off
                1 = turn on
                missing or empty: toggle
      Remarks: Corresponds to the setting Configuration | Colors and Styles | 
        Styles | Truncate filenames in the middle.
      Examples:
        middletruncation; //toggle
        middletruncation 0; //off
        middletruncation 1; //on