Everything FAYT : FAYT Script for DO 13

Everything FAYT emulates the built-in FAYT Everything search, with the main difference that the search is performed only after pressing Return, so now you have enough time to think in the middle of typing, without the search starting and the bar closing!
I created this add-in script some time ago and I thought it might be useful for other people here in the forum, so I decided to share it.
Other features to highlight are:

  • Local and global search in one command! (smart mode, with the option to switch to local mode by pressing the quick key twice).
  • Options to perform searches ignoring diacritics, case sensitivity, and with regular expressions.
  • By default, results are stored in a user-specified collection instead of a temporary one.
  • Results open in a tab, either at the source or destination (configurable).
  • Can be invoked from any path, including empty tabs.
  • Multilingual support (currently English and Spanish).
  • Command history support.

HOW TO INSTALL

Download the file below. Then run Prefs SCRIPTINSTALL and select the downloaded file.
:warning: IMPORTANT: Needs at least DOpus v13.5.1
v1.2.1 : EverythingFAYT.opusscriptinstall
:warning: IMPORTANT: Needs at least DOpus v13.7.4
v1.3.0 : EverythingFAYT.opusscriptinstall

USAGE

Now you can go to Preferences / Filtering and Sorting / Quick Keys (you can use Prefs PAGE=quickkeys for that) and change the command's assigned quick key. Change the hotkey to the one of your choice. By default it is set to use $, to avoid collisions. You can even assign the + key if you wish (remember to unassign it from EverythingGlobal first).

Global search

One of the most useful features is the ability to switch between local and global searches directly from the FAYT search bar. For example, to perform a global search, type the quick key once, followed by the text to be searched.

Local search

To perform a local search (related to the current path), type the quick key twice, followed by the query you want to use in Everything.

OPTIONS

In that same section, you can change some options too. Open the Everything FAYT menu and click/unclick according to your needs.
image

  • Open results in new tab (dest): By default, the results collection opens in a source tab. With this you can open it in destination
  • Don't use named collection: With this enabled, the results will be saved in the Search Results collection instead of the specified collection
  • Don't ignore diacritics: By default, all diacritics are ignored. Checking this disabled that.
  • Case sensitive, Regular Expressions and Whole words: Self explained.

SCRIPT CONFIGURATION

There are also other configurations to consider. In the Script Management window, select Everything FAYT and click in the gear icon.

log level selection Logging level to be displayed. OFF to shows critical errors only. DEBUG to shows all the messages. STANDARD to only shows the most relevants. WARNING to shows error conditions that are of consideration.
coll_name string Name of the collection where the results will be saved. Default is Everything.
delete_onstartup bool If true, all results collections will be deleted after starting DOpus. It only affects collections created by this command.
flags_are_global bool If true, search options (case, regex, diacritics, whole words) are applied globally in the search. Otherwise, they only affect the first search function.
query_as_name bool If true, the results will be saved as sub-collections with the query used as name. This is useful mainly because it allows multiple searches to be performed without overwriting previous results.
Note that only applies if Don't use named collection flag is off. (See in NOTES how to override this)
flags_quick_key string This option allows you to set the same flags without going all the way through Preferences > Filtering and Sorting > Quick Keys, simply by typing in the FAYT field this value. (See the video in Global Search for a visual example).
quick_config_key string Typing this in the FAYT field for quickly invoke the script own configuration dialog.

NOTES

  • The search automatically switches from local to global if:
    • The search is started in an empty tab.
    • The search is started in an open tab with a folder that does not belong to the regular file system (e.g., a collection).
  • To temporarily override Don't use named collection, prefix your query with ::. E.g. ::dopus.exe.
    • If query_as_name is true, it will be applied as well.

CHANGELOG

v1.3.0 (Jul 06, 2024) : EverythingFAYT.opusscriptinstall (7.0 KB)

  • Improved recognition of whether Everything is running (thanks to new implementations in DO).
  • Everything can now auto-start to execute the command if everything_autolaunch is set in Preferences/Miscellaneous/Advanced.
    • If auto-started by the command, the same command will close Everything upon completion.
Full changelog

v1.2.1 (May 20, 2024) : EverythingFAYT.opusscriptinstall (6.8 KB)

  • Improvements when showing suggestions from history.
  • Minor corrections/improvements.

v1.2.0 (Apr 21, 2024) : EverythingFAYT.opusscriptinstall (6.7 KB)

  • Now the flags dialog use the font name/size configured in Preferences / Colors and Fonts / Fonts > Dialogs.
  • Code updated/cleaned up.

v1.1.0 (Mar 03, 2024)

  • Updated to work with the changes introduced in 13.3.2 (mostly affects when the script is the default filter).
  • Added a new log level, Standard

v1.0.9 (Feb 22, 2024)

  • Improvement in flags configuration dialog (no more minimized listers).
  • Improvement in command history. Now you can get suggestions for both local and global mode.
  • Minor changes in code.

v1.0.8 (2024-01-23)

  • Minor changes in script configuration dialog.
  • Minor corrections.

v1.0.7 (2023-12-24)

  • Added basic support for search history (appears as a list of suggestions when typing in the FAYT field).

v1.0.6 (2023-12-08)

  • Flags can now be changed it from the script's own dialog or from Preferences and kept in sync.

v1.0.5 (2023-11-29):

  • Now search flags (regex, case, diacritics, etc) are global for all search terms. Set flags_are_global to false if you don't like it.
  • Added flag for whole word search.
  • Start the search with :: to quickly change the collection for results, between Everything collection (or whatever you decided to call it in coll_name) and Find Results. Useful for comparison, if you don't want the new search results to delete the last ones. Has no effect if query_as_name is set to true.

v1.0.4 (2023-11-16):

  • Minor update in order to use new v13.0.46 functions.

v1.0.3 (2023-11-11):

  • Added the option to use the query as a subcollection name. Useful when you plan to perform several searches and want to keep the previous results.
  • Added option to automatically delete results when starting DOpus.
  • Added the possibility to quickly invoke the script configuration window by typing a configurable character in the FAYT field.
  • Better logging info.
  • Code cleanup.

v1.0.2 (2023-11-03):

  • No more duplicate tabs for results!
  • The way results are opened has been slightly changed (e.g. if a search is performed when the active tab is the results tab itself, the tab is always reused regardless of whether Open results in new tab (dest) flag is checked or not).
  • Fixed an error if a local search was attempted on an empty tab.
  • If the results are opened at destination, they now obtain the focus.

v1.0.1 (2023-11-02) :

  • Added multi-language support for some strings (currently English and Spanish).
  • Added the possibility to set flags directly from the FAYT search bar, by typing the text configured in internal_flags_dlg
  • Now debug has logging levels (OFF, ALL and WARNING).
  • Minor bug fixes.

v1.0. (2023-10-22) : Initial release

10 Likes

Many thanks, works great.
Perhaps an option to use everything local or everything global.

You can change to local search if you type your quick key 2 times before your query. If the tab path is file system type or you just type your quick key 1 time, gets back to a global search

v1.0.1 is up for testing!. Also, the main post has been updated to show some examples and the new options.

2 Likes

Thank you! it's usefull...
is there a way to use existing tab? now i have 10 searches and 10 newly opened Everything's tab)))

@fkast there's no simple way at present, sorry. You could try asking the devs for a new argument for FIND SHOWRESULTS, something like SHOWRESULTS dest,tab,findexisting.
In the meantime, when I have some free time, I'll look for some way to do that, without breaking the workflow and it can be applied to all scenarios (with a named or temporary collection).

2 Likes

v1.0.2 is up for testing!. Please report if you find any bugs!

2 Likes

v1.0.3 is up for testing!

2 Likes

v1.0.4. contains minor improvements, taking advantage of the new features introduced in v13.0.46.

2 Likes

v1.0.5 adds some improvements for flag searchs (regex, case, etc). Now by default, they are applied in the whole search term, including all search functions. e.g. This would not work before (the same for built-in Everything FAYT), even with Regular Expressions flag enabled:
ext:exe stem:^dop

2 Likes

In new v1.0.6 flags can now be changed it from the script's own dialog or from Preferences and kept in sync.

3 Likes

v1.0.7 adds basic support for search history (appears as a list of suggestions when typing in the FAYT field).

2 Likes

v1.0.8 is up with minor corrections, just to get in tone with DO 13 release.

2 Likes

The result is empty after I use the search. What configuration do you want to adjust manually?

v1.0.9 (Feb 22, 2024)
I've posted a small update for this command. It fixes 2 reported issues for which I found a workaround. If you're using the command regularly, it's recommended to update to the latest version.

  • Improvement in flags configuration dialog (no more minimized listers/other windows).
  • Improvement in command history. Now you can get suggestions for both local and global mode.
  • Minor changes in code.
2 Likes

Excellent work, as usual!

v1.1.0 (Mar 03, 2024)

  • Updated to work with the changes introduced in 13.3.2 (mostly affects when the script is the default filter).
  • Added a new log level, Standard

Since 13.3.2 there has been a big change for FAYT scripts, which mostly affects the functionality of scripts like this one, if it is set as default. This version somewhat seeks to address that.
One thing to note is that if you use this script as the default filter, and you change the quick key or the default script, the script will take 5-10 seconds to notice it, which is the time it takes for that data to be written to the DOpus configuration file.

PS: I've noticed that many people almost never update the scripts they have installed, and I thought it would be great if the scripts had the ability to update automatically. In that sense, I have been experimenting with a new option for all my scripts, that allows them to check for new versions and optionally, update automatically. It is currently in a testing stage, so if you are interested you can send me a PM to access that version (initially for this script) in order to give me some feedback.
Thanks!

1 Like

We had problems before with scripts connecting to the internet on startup and delaying startup or causing other problems like error dialogs appearing or firewalls complaining. We'd rather they didn't try to update themselves, as it causes more problems than it solves.

Maybe we'll have a built-in mechanism one day, although the problem always comes down to needing a way to store the version information that everyone can edit. (Doing it via the forum is not recommended.)

Never mind, I had to update DOpus to 13.3.4 and "problem" solved re Failed (Min Ver).

:warning: IMPORTANT: Needs at least DOpus v13.5.1
v1.2.0 (Apr 21, 2024) :

  • Now the flag dialog use the font name/size configured in Preferences / Colors and Fonts / Fonts > Dialogs.
  • Code updated/cleaned up.
1 Like