Toggle button persistant hide/unhide files/folder based on Label filter presets

Hi there!

I would like to have a few buttons that toggle a persistant filter on/off that hides/unhides files and or folders based on saved Label Assignments / Label filter presets when preset conditions are met, or manually applied to a file/folder.

Persistent in the sense that when the toggle button is activated:

  • The applied hide filter remains active until manually deactivated
  • It stays applied regardless of changes in Lister View mode (details, list, thumbnails, etc.)
  • It remains active even when switching directories
  • It stays applied when switching tabs

I’ve searched the forum but couldn’t find any premade buttons.

A sample button code to achieve this functionality would be greatly appreciated as a starting point. I believe I should be able to modify the filter presets myself to create variations from there.

Thank you in advance!

(recent similar post that didn't get much traction, perhaps due unclear description, hence a new attempt :slightly_smiling_face:)

1 Like

Sorry for not replying to the original post, that one got missed.

I don't think there is a good way to do that now, at least in general.

You could do it for wildcard labels by applying the same wildcard as a filter, but the other types do things that realtime filtering doesn't tie into, mainly for performance reasons.

Something that might help would be to make buttons to automate finding particular files with labels, and push them to re-run the find when needed.

If that approach might work, it could be made closer to your full goal with a script that lets you turn on a mode (e.g. via a toolbar button, menu, hotkey, etc.) and then have the search be run automatically on each folder change, until the mode is turned off again. (I think that may also make it handle refreshes, to re-run the search in the current folder, but I'd need to double-check the details to be sure.)

If you'd like more detail about that, just ask. But I also understand it's not exactly what you're looking for, and I like the idea of being able to filter based on labels, at least for ones that calculate quickly. It would mean initial folder changes would take about as long as the Find method takes to return the first results (when set not to look in sub-folders), or at least that what's displayed would not settle down until about the same amount of time, if things are getting filtered out.