ad hoc color filters

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
admin
Site Admin
Posts: 66342
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

ad hoc color filters

Post by admin »

I just added something cool (I already know I will be using it all day long :biggrin: ), just implemented it as a script command, but later today I will add it to the interface (just like Power Filters had been added to Visual Filters some time ago): ad hoc color filters.

I post this here in advance because I need a name for the beast! "ad hoc color filters" is not really cutting it.

Here is the change log in its current state:

Code: Select all

    + Scripting got a new function.
      Name: ColorFilter
      Action: Activates one or more color filters in Tree and List.
      Syntax: colorfilter([filters], [separator=||])
        filters:    Filter, or list of filters separated by separator.
                    If empty ("") any color filters are deactivated.
                    If missing the function just returns the currently active filters.
        separator:  Separator for list of filters.
        return:     Currently active filters.
      Examples:
        colorfilter("+lent:>12 //long filenames>BF6000,");
        colorfilter("+len:>260 //overlong items>FFFFFF,FB4F04");
        colorfilter("+dateM: dw 6-7 //last modified on a weekend>FFFFFF,B83E30");
        colorfilter("+ageC d:d //folders created today>EEEEEE,4A97EC||+dir:xy*>FFFF00,FF8000");
        colorfilter(""); //deactivate any color filter
        text colorfilter(), 800; //return the currently active filters
      Remarks:
      - The color filter definition uses the full Color Filter syntax 
        including colors in RRGGBB and leading "+". You can see this 
        syntax in List Management | Color Filters, in Editor Mode (F6).
      - If you activate a new filter, the old filter is replaced by it.
      - If you activate the same filter again it is deactivated (toggle).
      - The filter activated by this command are completely independent 
        of the Color Filters defined and enabled via Configuration. They 
        even work if the normal Color Filters are disabled.
      - These color filters are not retained across sessions.
      Usage:
      These ad hoc color filters have a couple of advantages over the 
      normal color filters:
      - You can quickly and individually turn them on/off without going 
        through Configuration.
      - They are always processed on top of all other color filters, so 
        you always see all matches. Whereas in normal color filters it's 
        common that the first match covers any possible other matches 
        because usually only one color can be shown at the time for each 
        item (exception: Details view allows two colors simultaneously 
        per item under certain conditions).
      - Because lists of filters are supported you can use this function 
        to toggle whole color schemes which would be very cumbersome to 
        do using the normal color filters.
      - It's also easy to share color schemes between users via user 
        button snippets or included catalogs.
So, "Power Colors", "Quick Color Filters", "Quick Colors"???

Good morning from Cologne by the way,
:cup:
Don

Nighted
Posts: 463
Joined: 21 Jan 2007 01:58
Location: Gitmo Nation North, Win 7/10/Linux/(x64)

Re: ad hoc color filters

Post by Nighted »

Power Filter Syntax.

I dunno, my brain hurts.
I want XY to serve soft ice cream. Please Don, make XY serve soft ice cream.

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: ad hoc color filters

Post by FluxTorpedoe »

Sounds cooool! 8)
Geez, I already smell the need for a scripted "color filter manager"... ;)

Quick suggestion:
Dynamic color filters

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47
Location: XY64 Latest Beta , Win 11, 96dpi, 100%

Re: ad hoc color filters

Post by nerdweed »

How about Colorize

Thats what it does, when need be it colorizes folder like a magic spell. And it vanishes in next session.

admin
Site Admin
Posts: 66342
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: ad hoc color filters

Post by admin »

"Dynamic color filters", "Colorize" ... I like both! Maybe I call the button (the soon to be added "arrow"-button part of the Color Filters button) "Colorize", and the used filters "Dynamic color filters" as opposed to " Color Filters".

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: ad hoc color filters

Post by TheQwerty »

As this is just an extension of Color Filters I think it is important to continue to refer to them as such.
And let's be honest this feature is just a way to quickly and temporarily create, modify, and apply color filters with high-importance.

Thoughts on other Suggestions:
Dynamic Color Filters -- I feel this is confusing because the color filters themselves are not really dynamic, and nothing about this makes them dynamic. (I also see no reason to rename 'Color Filters' to something longer just to fit the word dynamic in there, as you suggest Don.)

Suggestions:
Temporary Color Filters -- Since they are not retained across sessions.
Quick Color Filters -- Although this might be confusing since the other 'Quick' things all have very simple address bar incantations.
Instant Color Filters -- Same as the previous but avoids the confusion with other 'Quick' things.
Scriptable Color Filters -- It's pretty darn accurate.

admin
Site Admin
Posts: 66342
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: ad hoc color filters

Post by admin »

Difficult...:)

I like Instant Color Filters but I don't have a problem with Dynamic Color Filters. They are not dynamic in themselves but their use is pretty dynamic.

I will now upload the script command and let you play with it. Maybe it helps finding the name for the button/feature.

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: ad hoc color filters

Post by klownboy »

They're dynamic in that we can establish a color for files to be processed and change their color dynamically in the script during or after processing. "Dynamic Color Filters" were "just dropped in to see what condition my condition was in" (in scripting that is). Can you tell I saw Kenny Rogers in a free concert in Colorado a couple of weeks ago? I suppose they'd be more "dynamic" as oppose to the current color filters being more "static". http://www.youtube.com/watch?v=Gfa6umSlR8A You'd never know he'd made songs like this before his country days.

binocular222
Posts: 1423
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: ad hoc color filters

Post by binocular222 »

The name should help to differentiate the Color Filter provided by List Management and the new filter provided by scripting.
So, something like Scripting Color Filter.
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

admin
Site Admin
Posts: 66342
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: ad hoc color filters

Post by admin »

I have sweet (or rather salty) memories of the Cupnoodles Museum in Yokohama (http://upload.wikimedia.org/wikipedia/c ... dles-2.jpg) therefore I currently tend to Instant Color Filters which nicely implies the ready-made nature of them IMO. A set of them will come predefined and click-ready from factory. I'm thinking of the following:

Code: Select all

Folders Created Today ??
Folders This Week ??

Modified In The Last 30 Mins
Modified In The Last 3 Hours
Modified Today
Modified This Week
Modified This Year

Empty Files

Overlong Filenames
Any other instant filters that should come from factory?

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47
Location: XY64 Latest Beta , Win 11, 96dpi, 100%

Re: ad hoc color filters

Post by nerdweed »

Can these be added, please

Files over certain size (1 GB+) - This can include folders as well to help clean up drives

Files touched (only created and modified - no accessed) during this XY session - That becomes just a catchall to see what has been done.

admin
Site Admin
Posts: 66342
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: ad hoc color filters

Post by admin »

Folder size is not possible (too slow), but file sizes ok. So just like Power Filters:

Code: Select all

Empty Files
Files Larger 1 MB
Files Larger 10 MB
Files Larger 100 MB
Files Larger 1.000 MB
... during this XY session: hmm, there is no way currently to define this.

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47
Location: XY64 Latest Beta , Win 11, 96dpi, 100%

Re: ad hoc color filters

Post by nerdweed »

My mistake, I thought it would be done only at the instance the color filter is activated.

Might be a variable which stores the time XY started can do the trick. (99.5%, you have already considered this). And if I wasn't clear enough, I didn't mean changed from XY only, it can be changed from anywhere.

A suggestion (wish), can the Modified in this list and Power Filter be customised - Allow users to select Created \ Modified or Both and accessible through some Permanent variable (common for both lists). I currently have a clone of Power Filters with just some extra options that allows either created or modified. If users don't have Permanent variables remembered across session, it can default back to Modified.

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: ad hoc color filters

Post by Marco »

nerdweed wrote: Might be a variable which stores the time XY started can do the trick. (99.5%, you have already considered this). And if I wasn't clear enough, I didn't mean changed from XY only, it can be changed from anywhere.
Had the very same thought.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: ad hoc color filters

Post by klownboy »

Personally, I don't think we need that many built-in's for file size, maybe just the files larger than 100 MG, 1 GB and Empty files. Were you planning on having a user modifiable instant color filiters on right click as you do for the Visual Filters?

As far as Files Modified/Created, I'd be happy with "Hour", "Day", "Week", and "Year". This "Session" would also be nice if you can do without it slowing anything down especially startup. With those, I don't really think we need minutes.

Instant is fine with me especially since you're incorporating it into a CTB as well as scripting.

Post Reply