Shortcut Target Size Columns needs adjustments

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Thy Grand Voidinesss
Posts: 771
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: 18632
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: 771
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 7892 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: 18632
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: 771
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: 18632
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: 771
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: 771
Joined: Wed Jun 01, 2022 5:01 pm

Re: Shortcut Target Size Columns needs adjustments

Post by Thy Grand Voidinesss »

Well?
void
Developer
Posts: 18632
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
    #,###
Thy Grand Voidinesss
Posts: 771
Joined: Wed Jun 01, 2022 5:01 pm

Re: Shortcut Target Size Columns needs adjustments

Post by Thy Grand Voidinesss »

Thank you for your help so far

I am using now version 1.5.0.1396a x64 Portable and Bookmark that has its Search set-up to Custom

*.lnk addcolumn:a a-label:="LNK Target Size" a-align:right a:=getproperty($shortcut-target:,"size") a-format:size


The remaining and new issues are:


I]
Thy Grand Voidinesss wrote: Mon Jan 08, 2024 7:30 am [...]
and when LNK leads to a removed / non-existing element then it shows
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
I would still argue that a dead link is an empty set and not a zero value. So please consider implementing for the Shortcut Target Size column one of these indications:

DEAD LINK

DEAD

DL


Or maybe even give users an option to decide what is to be shown:
● 0 value,
● one of these three descriptions
● an entirely customizable text; either through Advanced Options or as part of the
addcolumn
syntax
In my opinion DEAD LINK would be most informative- but it would take too much of precious horizontal space in order to be displayed


II]
If a link becomes dead when it is being displayed on the list of items in the main window via the above Bookmark, then its size reported by that custom made LNK Target Size column does not change. The field of Search Edit must be changed to something else and then re-changed back to this filtering expression; or [alternatively] the whole program must be re-opened [my configuration retains between sessions expressions in the Search Edit]


III]
When I came back to dealing with this feature / topic after upgrading my Everything, I tried to sort my LNK files by this custom LNK Target Size column. At first only those LNKs which were visible in the main window got sorted out. Because I then had to scroll down to apparently load up Target Sizes of following one- which was indicated by the fact that I could see the values being added gradually

Did those targeted size values really had to be checked first by Everything and added to my database file in order to succumb to sorting in that LNK Target Size column? If yes- then should not this be performed automatically in the background? Because: how is a user suppose to know that sorting will only affect some of items already present in the main window? And this matches the ill behavior from previous point i.e. LNK becoming a dead link during session but still showing a size value. So, no matter if this is an intended behavior or a glitch, the conclusion is that Everything is not not monitoring this parameter in real time


IV]
The parameter

a-align:right


does work for the data displayed in the custom made Column. But is there a similar one for controlling of its header? Right now I get this dichotomy:
custom column header is left aligned.jpg
custom column header is left aligned.jpg (52.81 KiB) Viewed 3457 times


V]
In order to open in some third party file-manager program the location of an LNK file, user must in main window right-click row of the chosen LNK, then look for the sub-menu bearing name of the location folder [which sub-menu will be located near the top of the main shell menu, in its second section], then unfold it and choose Open

I propose renaming it to Open Location for the purpose of becoming self-explanatory, which will be needed if it would ever become configurable at

Tools > Options > General > Context Menu > Open Location


In other words: I propose adding another optional Context Menu feature alike to those 18 already available

The reasoning behind it is not only giving users a quicker access, but also not forcing them to remember that Open Location is already available under the vague term Open and being somewhat hidden in a sub-menu. Because if they forget about its existence then they might futilely waste time on checking configurations and behaviors of

Tools > Options > General > Context Menu > Explore
Tools > Options > General > Context Menu > Explore Path
Tools > Options > General > Context Menu > Open Path

That is exactly what has happened to me: I thought that users, when wanting to access LNK file and not its target, were supposed to use Copy Path / Copy Full Path and then manually paste that data to some program with an address bar [because a similar issue I experienced in file-handler FreeCommander when adding for icons on Toolbars LNK files as executable paths]
void
Developer
Posts: 18632
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Target Size Columns needs adjustments

Post by void »

Thank you for your feedback Thy Grand Voidinesss,
I would still argue that a dead link is an empty set and not a zero value. So please consider implementing for the Shortcut Target Size column one of these indications:

DEAD LINK

DEAD

DL
Please try the following:

Code: Select all

*.lnk addcolumn:a a-label:="LNK Target Size" a-align:right a:=getproperty($shortcut-target:,"size")?formatsize(getproperty($shortcut-target:,"size"),0):"DEADLINK"  
-remove a-format:size and call formatsize.

The next alpha update will format text correctly with a-format:size, so the following will work:

Code: Select all

*.lnk addcolumn:a a-label:="LNK Target Size" a:=getproperty($shortcut-target:,"size")?getproperty($shortcut-target:,"size"):"DEADLINK" a-format:size

If a link becomes dead when it is being displayed on the list of items in the main window via the above Bookmark, then its size reported by that custom made LNK Target Size column does not change. The field of Search Edit must be changed to something else and then re-changed back to this filtering expression; or [alternatively] the whole program must be re-opened [my configuration retains between sessions expressions in the Search Edit]
Press F5 to refresh the search.


When I came back to dealing with this feature / topic after upgrading my Everything, I tried to sort my LNK files by this custom LNK Target Size column. At first only those LNKs which were visible in the main window got sorted out. Because I then had to scroll down to apparently load up Target Sizes of following one- which was indicated by the fact that I could see the values being added gradually
Everything will gather ALL the values when you sort.
A progress bar is shown in the status bar on the right.
It may take several minutes to gather all the required information.


Did those targeted size values really had to be checked first by Everything and added to my database file in order to succumb to sorting in that LNK Target Size column? If yes- then should not this be performed automatically in the background? Because: how is a user suppose to know that sorting will only affect some of items already present in the main window? And this matches the ill behavior from previous point i.e. LNK becoming a dead link during session but still showing a size value. So, no matter if this is an intended behavior or a glitch, the conclusion is that Everything is not not monitoring this parameter in real time
Custom columns are only calculated once.
When sorting, custom columns are only calculated if they haven't already been calculated.
So sorting will not change already calculated custom columns.

Press F5 and resort by your custom column.


The parameter

a-align:right


does work for the data displayed in the custom made Column. But is there a similar one for controlling of its header? Right now I get this dichotomy:
The next alpha update will right align the column header.
The next alpha update will also right align the column header when using a-format:size -no need to specify a-align:right


In order to open in some third party file-manager program the location of an LNK file, user must in main window right-click row of the chosen LNK, then look for the sub-menu bearing name of the location folder [which sub-menu will be located near the top of the main shell menu, in its second section], then unfold it and choose Open
Use the Open Path context menu item. -It should be the second item.

Open Path can be enabled/disabled under Tools -> Options -> Context menu -> Open Path.
-It's enabled by default.
Post Reply