Hi'
At last I could find a moment to try Custom Columns!
So many possibilities that it's hard to envision its full potential!
A few questions (
?) and suggestions:
1. With
"Trigger: Browse" for scripted CCs, switching between tabs lose responsiveness while XY computes the CC values, even when those CC aren't visible — e.g. even when switching to a tab in List view!
2. With
"Trigger: List" for scripted CCs, custom columns don't keep their (autocalculated) size but are shrunk when switching between tabs (on a default ::fresh) — whereas with "Trigger: Browse", their size remains correct and doesn't change on tab switching.
- CC Autosize.png (6.94 KiB) Viewed 2266 times
3. With
setcolumns() and
flag "3" to define columns visibility and their width, the visibility and width are correctly set for regular columns, but only the visibility is set for CCs, not the width (whether they're referenced by
":d-#" or
":d-Name").
Code: Select all
setcolumns("+Name, Ext, +Label.100", 3); // Label is shown and sized
setcolumns("+Name, Ext, +:d-1.100", 3); // CC-#1 is shown but not sized
4. Wish:
"Trigger: Refresh" "Do not AutoUpdate CCs"
It would only compute the CC values the first time they're displayed, or on RefreshList / RefreshColumn — in any other case (e.g. tab switching), the existing values, obsolete or not, would remain displayed as is. Huge responsiveness booster!
Edit:The more I use CCs, the more I think a "Do not update" is important. Though it should be available for all Trigger modes, so it'd rather be a checkbox like "Only update cells on refresh". That way, even "Click" CCs would keep their already calculated content (e.g. on tab switching), instead of reverting to the script icon.
5. Wish: CTRL+Click on a "Trigger: Click" icon would trigger the computation for the whole CC (same as "Refresh Column"); ALT+CTRL+Click would compute all "Trigger: Click" CCs. Alternately, it could be set by a tweak...
- - - - - - - - -
Case for #4: my first "need" for CCs was to create two columns that would display folder content (nb dirs > nb files) and folder size (cf. screenshot) —
BUT without being cleared on tab switching like what happens with "Calculate Folder Sizes". This already works (it's not cleared), but it's recalculated every time...
Well, I hope I didn't throw too much at once — it's been a while, I guess I missed tinkering with XYplorer!
Have a nice day,
Flux
PS: just in case, here are the scripts of my two columns.
Code: Select all
// Ext+
if <cc_isfolder> {
return foldersize(<cc_item>, "<d>")." › ".foldersize(<cc_item>, "<f>");
} else {
return getpathcomponent(<cc_item>, "ext");
}
// Size+
if <cc_isfolder> {
return formatbytes(foldersize(<cc_item>, "<r>"));
} else {
return report("{size FLEX}", <cc_item>);
}
[/size]