If I have a folder of, say 100 files and I checkbox tick or select 4 of them, how can I sort on those ticked or selected files.
To clarify, if I have "file001.jpg" through "file100.jpg" and I select "file001/009/020/078.jpg, how can I sort them so that the selected files are sorted in their order at the top of the list with the unselected files below?
I'm not sure there is a quick/easy way to sort the selected items to the top (it'd probably involve manual sort; maybe a script could do it), but if you just want a quick way to focus on what's selected, you could hide the unselected items:
select nopattern hideunsel
Then return to normal with:
select nopattern showhidden
That will do for now - thanks Leo.
Would there be any way to toggle that button, Leo? I've tried a couple of ways to 'showhidden' after "hideunsel" but it looks to me that I'll need two buttons.
Could be made into a toggle using a small script, since they can check hidden counts.
Using two buttons (or left/right click on a three-button) is easiest, though.
@lemmy
Here is an Opus 13 button to toggle showing only selected items. On hovering the button shows the current status of the toggle.
On-Off Only Selected Items Toggle.dcf (1.3 KB)
Here is the code
//The following toggle changes the label to indicate the status
//It requires a visible button.A three button button will not work.
@label:Val("$glob:UNSELECT")=="on" ? "<b>ONLY SELECTED Items are Shown</b>" : "<b>ALL Items are shown</b>"
@if:$glob:UNSELECT
@set glob:UNSELECT
@nodeselect
//Omit the following command to keep the selected items selected
Select NOPATTERN HIDESEL
Select SHOWHIDDEN NOPATTERN
//@nodeselect
@if:else
@nodeselect
Select NOPATTERN HIDEUNSEL
//@nodeselect
@set glob:UNSELECT=on
@if:common
@toggle:update
Would tab:
scope make more sense for the variables, instead of glob:
?
@Leo
Under what circumstances should I use one of these - glob:, lst:, tab: - over the others? Resource overhead? Other? As long as all global variables are unique what is the problem that the scope could be smaller?
Open two windows and you'll see the variable you're using affects both, but the actual selection/hiding state is local to the tab and not global. Your button will be out of sync unless you only ever have one window/tab.
So you should probably be using a tab-scoped variable, not a global variable.
Thanks to both jinsight and Leo. Used the script, changed the variables glob to tab. Works like a champ. Appreciated the info!