Scriptable field of type:filter in toolbars

I'm interested in the possibility to add a custom field to the toolbar which would behave similar to fieldtype: filter, except it would execute a custom script on-key-up with the fields text as argument. Such a type could also be declared inside a script addon and appear in the field type menu automatically if any addon exposes such functionality similar to how custom columns are exposed. Having a delay timer built-in would be quite useful as well as to not spam requests while the user is still typing or have to handle it in code.

For now the only way to do something similar is with a dialog which has to be initialized and for obvious reasons can't be a constant part of the toolbar.

Example use cases include:

  • A tab filter which would color all tabs if they match the entered text partially or even send them to top (yes I have more than 50 tabs on each side at all times). Hiding specific filtered tabs would require a new command.
  • Streaming results from a database and displaying them as a file collection with dummy files
  • Rewriting to be easier and even more transparent to use comes to mind as well.

Thank you.

Nice idea. We've been vaguely thinking about something similar for a while but it's never gone far as it's quite a lot of work to implement. Possibly in the future, though.

One thing you can do, since it's keyboard driven anyway, is have the script add e.g. a short or single letter command which you can then access via the > key (which opens a command field at the bottom of the file display).

e.g. You could type >t xyz* and have it run a script which highlights all tabs matching xyz*.

Not quite as nice as a dedicated field, of course, but almost, and uses less space. You can use the up and down cursor keys to get history of previous commands, too.

Never would have thought to use the > key to execute a script. BRILLIANT!
You're right about it using less space too. Toolbars are getting crowded as it is.
No hurry on the main solution then. Just as a possible idea that can come in DO13 or later.

Thanks Leo.

1 Like