Shortcut Target Size Columns needs adjustments

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Shortcut Target Size Columns needs adjustments

Post by Thy Grand Voidinesss »

[Coming out of this discussion: viewtopic.php?t=14264]


#1] Currently data in this Column of Target Size has format

Code: Select all

0000000000
which is hard to read. So please change it to

Code: Select all

0 000 000 000
at least; but preferably just make it succumb to the rules set by the user for showing of data in the Column of Size


#2]
Currently data in this Column is aligned to the left side, which makes it hard to compare between items [assuming that user has his whole operating system with alignment set to right side / left-to-right text order]. So please change it to to right at least; but preferably just make it succumb to the rules set by the user for showing of data in the Column of Size


#3] When LNK is leading to an empty folder the value shown is

Code: Select all

0
and when LNK leads to a removed / non-existing element then it shows

Code: Select all

 
i.e. nothing. I would argue that instead of empty space it should show something like

Code: Select all

DEAD LINK
so that a user would know it is really a dead link and not a case of Everything for whatever reason not being able to access and / or report the target
Last edited by Thy Grand Voidinesss on Sat Apr 13, 2024 9:28 am, edited 3 times in total.
void
Developer
Posts: 16974
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Target Size Columns needs adjustments

Post by void »

Use format-size() to format sizes:

*.lnk addcolumn:a a-label:="Shortcut Target Size" a:=format-size(get-property($shortcut-target:,"size"))

format-size()



Everything 1.5.0.1367a adds column alignment options.

Everything will try to automatically align numbers to the right.

To override the automatic alignment, please use:
a-align:left
-or-
a-align:right

For example:

*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right a:=formatsize(getproperty($shortcut-target:,"size"))
*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right a:=formatsize(getproperty($shortcut-target:,"size"),1)
*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right a:=formatsize(getproperty($shortcut-target:,"size"),2)

a-align:
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Shortcut Target Size Columns needs adjustments

Post by Thy Grand Voidinesss »

I settled on using

Code: Select all

*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right a:=formatsize(getproperty($shortcut-target:,"size"),3)
and unfortunately noticed an issue:

Everything Target Size Column sorting issue.jpg
Everything Target Size Column sorting issue.jpg (168.7 KiB) Viewed 2039 times
i.e. when sorted by it this Column of Target Size Everything puts an LNK leading to 11 GB file between a one leading to 10 MB and a one leading to a 12 MB file


And also:
I wish for this Shortcut Target Size to utilize by default a common format of

Code: Select all

X.YY
even if fraction YY digits [after the dot would] be

Code: Select all

00
i.e. to show for example

Code: Select all

10.40
instead of

Code: Select all

10.4
And it more advanced version: to let the user decide how many digits are to be shown, just like in is possible in case of Column for Size, for which [as it is shown in the above screenshot] I decided to utilize format

Code: Select all

X.YYY
thus seeing for example

Code: Select all

1.006 kB
instead of

Code: Select all

1.01 kB
Last edited by Thy Grand Voidinesss on Sat Apr 13, 2024 9:40 am, edited 1 time in total.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Shortcut Target Size Columns needs adjustments

Post by nikov »

Thy Grand Voidinesss wrote: Thu Feb 08, 2024 6:12 pm and unfortunately noticed an issue:...
I also noticed this issue, this not only happens for size property, this also happens for duration/length, date-time and maybe for many other properties as well.
But then I thought what if, someone really wants to sort by "code-point" instead of "context/meaning"? For them this might be a feature. Also, it maybe harder to make it context/meaning aware.
Then I also thought its workaround can be:
Adding two columns. One for sorting (column without the format) and another for displaying (column with the format).

Thy Grand Voidinesss wrote: Thu Feb 08, 2024 6:12 pm And also:...
I don't know how much this is related to your format but this reminded about string format operator (%) or format() function or f-string of Python or some programming languages; not sure whether Everything already has this but it can be a nice addition.
void
Developer
Posts: 16974
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Target Size Columns needs adjustments

Post by void »

I'm thinking an a-format:size search function be useful here..

For example:

*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right a:=getproperty($shortcut-target:,"size") a-format:size
Sorting by column a would be done as bytes and displayed using your size formatting options (Tools -> Options -> View).



As you mentioned, for now, you could use a secondary column to perform the sort:

*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right b:=getproperty($shortcut-target:,"size") a:=formatsize($b:,3) sort:b




There's printf() and TEXT() for formatting.
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Shortcut Target Size Columns needs adjustments

Post by Thy Grand Voidinesss »

void wrote: Fri Feb 09, 2024 4:11 am [...]
*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right a:=getproperty($shortcut-target:,"size") a-format:size
Sorting by column a would be done as bytes and displayed using your size formatting options (Tools -> Options -> View).
This does nothing, i.e. no items are shown and there is no Property Search being conducted

void wrote: Fri Feb 09, 2024 4:11 am [...]
use a secondary column to perform the sort:

*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right b:=getproperty($shortcut-target:,"size") a:=formatsize($b:,3) sort:b
I do not get an additional Column


And I already had chosen

Tools > Options > View > Size standard > Metric
Tools > Options > View > Size format > Auto
void
Developer
Posts: 16974
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Target Size Columns needs adjustments

Post by void »

This does nothing, i.e. no items are shown and there is no Property Search being conducted
a-format: has not been implemented yet.


I do not get an additional Column
No additional column is added.
However, your sort order should now be correct.
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Shortcut Target Size Columns needs adjustments

Post by Thy Grand Voidinesss »

I am now on Everything 1.5.0.1371a x64 Portable and still using Bookmark

Code: Select all

*.lnk addcolumn:a a-label:="Shortcut Target Size" a-align:right a:=formatsize(getproperty($shortcut-target:,"size"),3)
which still
Thy Grand Voidinesss wrote: Thu Feb 08, 2024 6:12 pm [...]
when sorted by it this Column of Target Size Everything puts an LNK leading to 11 GB file between a one leading to 10 MB and a one leading to a 12 MB file

And what about
Thy Grand Voidinesss wrote: Thu Feb 08, 2024 6:12 pm [...]
wish for this Shortcut Target Size to utilize by default a common format of

Code: Select all

X.YY
[...]
Is it going to happen, at least in a foreseeable future?
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Shortcut Target Size Columns needs adjustments

Post by Thy Grand Voidinesss »

Well?
void
Developer
Posts: 16974
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Target Size Columns needs adjustments

Post by void »

Everything 1.5.0.1384a adds support for formatting custom columns.


Syntax:
a-format:<format-type>


For example:

Code: Select all

*.lnk addcolumn:a a-label:="Shortcut Target Size" a:=getproperty($shortcut-target:,"size") a-format:size:mb
This will sort your results correctly by size in bytes and display the column A values as sizes in MB.



Supported column formats:
  • size:auto
  • size:bytes
  • size:kb
  • size:mb
  • size:gb
  • size
  • duration
  • length
  • number
  • attributes
  • filetimeutc
  • filetime
  • datetime
  • date
  • time
  • Any Text() format. For example:
    YYYY-MM-DD
    or
    #,###
Post Reply