Page 1 of 1

sc colorfilter() - limit to pane?

Posted: 12 Jan 2015 22:35
by highend
Is there any way to limit a colorfilter() to the pane view?

I've a locked mini tree on the left side and every color filter (that includes folders) that is invoked by colorfilter() paints this as well (which I'd like to avoid) :)

Re: sc colorfilter() - limit to pane?

Posted: 13 Jan 2015 13:27
by TheQwerty
I thought your only option would be to disable Apply color filters to the Tree but it appears instant color filters do not currently abide that option anyhow.


Not sure how this would best be addressed...
  1. Have ICFs obey the Apply color filters to the Tree option?
  2. Have separate options for ICFs?
  3. A new control parameter to colorfilter:

    Code: Select all

    colorfilter([filters], [separator=||], [control=*])
    control: Filters will be applied to the specified control.
    Accepted values:
    E = Everywhere (Default) (or maybe this should be '*'?)
    T = Tree
    A, I, 1, 2 = List Pane (not sure we can or should go this specific, maybe just 'L' for list.)
  4. New switches for all color filters:

    Code: Select all

    t-switch: tree
    Applies this filter only to the Tree.
    +ageC:d //t|>,FFF80
    
    l-switch: list
    Applies this filter only to the List.
    +ageC:d //l|>,FFF80
I kind of like that last one, but not sure it really helps with this particular issue. :eh:

Re: sc colorfilter() - limit to pane?

Posted: 13 Jan 2015 13:58
by highend
I thought your only option would be to disable Apply color filters to the Tree but it appears instant color filters do not currently abide that option anyhow.
Yeah, I tried that before I posted *g*

I guess 4. would be the optimal solution because it allows me / us / everyone to assign color filters for different views (or restrict them to at least one).

The "//" as a switch type parameter won't work; iirc it's reserved for comments inside the filter but regardless of what it used it would be greatly appreciated when we don't have to colorize everything :)

Thanks for taking the time to create such a decent explanation of possible params!

Re: sc colorfilter() - limit to pane?

Posted: 13 Jan 2015 15:07
by TheQwerty
highend wrote:The "//" as a switch type parameter won't work; iirc it's reserved for comments inside the filter but regardless of what it used it would be greatly appreciated when we don't have to colorize everything :)
Should still work - Don abused comments to add switches and pre-filters. Just need to ensure there's a pipe after them but before the comment (even if there is none).


And now for some ugly hacks... 8)
Combine the filter pattern with one of the selectors which does not work in the tree.

Code: Select all

colorfilter('dateC: < 0000 //|filter:*Apps*>,00FF00');
colorfilter('Apps AND lenT: > 0>,00FF00');
It's rather messy if you are trying to create a single ICF for multiple items - though the pre-filter can use full paths so that might be good enough. Plus, the pre-filter apparently doesn't auto-wildcard (treat 'A' as '*A*') which can sometimes be helpful.


Only luck I've had doing the opposite, in tree only, requires applying two filters:

Code: Select all

colorfilter(<<<ICF
Apps AND lenT: > 0 //n|>00FF00,000000
Apps>,00FF00
ICF
 , "<crlf>");
But you have to highlight the list pane's matches with some colors since there's no "don't color matches" or transparent switch and just matching will override the non-instant color filters. It's a non-working hack in my eyes. :?

Re: sc colorfilter() - limit to pane?

Posted: 13 Jan 2015 15:17
by highend
Should still work - Don abused comments to add switches and pre-filters
Yeah, after reading the help file again... It's there^^

I'm unsure if I understand your example correctly (didn't had any sleep in the last 24 hours).

How to define a simple ICF like this one, that matches on all files and folders in the list pane?
"Created or Modified [24 hours]" ageC: <= 24 h;ageM: <= 24 h>FFFFFF,70B926

Re: sc colorfilter() - limit to pane?

Posted: 13 Jan 2015 15:38
by TheQwerty
As I said with multiple patterns it gets tricky.

The key is this bit from help:
::help('idh_colorfilters.htm#idh_cfoverview'); wrote:Color filters allow you to color-code the files and folders currently visible in the List pane based on various criteria like name, attributes, size, date, age, name length, and properties. Filters based on name, age and attributes optionally also work in the Tree pane.
Thus to prevent a filter from working in the tree you must include a size, date, name length, or properties selector; or put another way for each pattern in your filter make it require one of these non-tree selectors also be true.

The length selectors are ripe for abuse, since they are easy to force true - if you have names or paths of zero-length you probably have bigger problems. ;)

This should highlight the items in the list only:

Code: Select all

colorfilter('"Created or Modified [24 hours]" ageC: <= 24 h AND lenT: > 0;ageM: <= 24 h AND lenT: > 0>FFFFFF,70B926');
However, apparently there's a bug somewhere (could be in my thinking) because changing the order so that the length selectors are first does not prevent it from working in the tree:

Code: Select all

colorfilter('"Created or Modified [24 hours]" lenT: > 0 AND ageC: <= 24 h;lenT: > 0 AND ageM: <= 24 h>FFFFFF,70B926');
:veryconfused:

Re: sc colorfilter() - limit to pane?

Posted: 13 Jan 2015 16:30
by highend
Nice, now I got it! Thanks a lot! I'll should probably get some sleep :tup:

Re: sc colorfilter() - limit to pane?

Posted: 01 Oct 2015 19:22
by TheQwerty
*bump*

The original wish of being able to restrict SC ColorFilter() to list or tree only still stands.

But as we have a bit of a workaround, I'm actually just bumping this bug: :bug:
TheQwerty wrote:This should highlight the items in the list only:

Code: Select all

colorfilter('"Created or Modified [24 hours]" ageC: <= 24 h AND lenT: > 0;ageM: <= 24 h AND lenT: > 0>FFFFFF,70B926');
However, apparently there's a bug somewhere (could be in my thinking) because changing the order so that the length selectors are first does not prevent it from working in the tree:

Code: Select all

colorfilter('"Created or Modified [24 hours]" lenT: > 0 AND ageC: <= 24 h;lenT: > 0 AND ageM: <= 24 h>FFFFFF,70B926');
:veryconfused:

Re: sc colorfilter() - limit to pane?

Posted: 16 Mar 2016 16:18
by TheQwerty
* bumps the lingering :bug: mentioned in the previous unsuccessful bump *

Re: sc colorfilter() - limit to pane?

Posted: 28 Apr 2016 09:53
by admin
TheQwerty wrote:* bumps the lingering :bug: mentioned in the previous unsuccessful bump *
Fixed! (Cannot take another bump) :cup:

Re: sc colorfilter() - limit to pane?

Posted: 28 Apr 2016 10:44
by admin
TheQwerty wrote:New switches for all color filters:

Code: Select all

t-switch: tree
Applies this filter only to the Tree.
+ageC:d //t|>,FFF80

l-switch: list
Applies this filter only to the List.
+ageC:d //l|>,FFF80
I went for this one (implemented a little different).