Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
<system:String x:Key="flowlauncher_plugin_everything_sort_by_descending">&#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_nonfastsort_warning">Warning: This is not a Fast Sort option, searches may be slow</system:String>

<system:String x:Key="flowlauncher_plugin_everything_search_fullpath">Search Full Path</system:String>

<system:String x:Key="flowlauncher_plugin_everything_click_to_launch_or_install">Click to launch or install Everything</system:String>
<system:String x:Key="flowlauncher_plugin_everything_installing_title">Everything Installation</system:String>
<system:String x:Key="flowlauncher_plugin_everything_installing_subtitle">Installing Everything service. Please wait...</system:String>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,38 @@ private async ValueTask ThrowIfEverythingNotAvailableAsync(CancellationToken tok
private async ValueTask<bool> ClickToInstallEverythingAsync(ActionContext _)
{
var installedPath = await EverythingDownloadHelper.PromptDownloadIfNotInstallAsync(Settings.EverythingInstalledPath, Main.Context.API);

if (installedPath == null)
{
Main.Context.API.ShowMsgError("Unable to find Everything.exe");

return false;
}

Settings.EverythingInstalledPath = installedPath;
Process.Start(installedPath, "-startup");

return true;
}

public async IAsyncEnumerable<SearchResult> SearchAsync(string search, [EnumeratorCancellation] CancellationToken token)
{
await ThrowIfEverythingNotAvailableAsync(token);

if (token.IsCancellationRequested)
yield break;
var option = new EverythingSearchOption(search, Settings.SortOption);

var option = new EverythingSearchOption(search, Settings.SortOption, IsFullPathSearch: Settings.EverythingSearchFullPath);

await foreach (var result in EverythingApi.SearchAsync(option, token))
yield return result;
}
public async IAsyncEnumerable<SearchResult> ContentSearchAsync(string plainSearch,
string contentSearch, [EnumeratorCancellation] CancellationToken token)
string contentSearch,
[EnumeratorCancellation] CancellationToken token)
{
await ThrowIfEverythingNotAvailableAsync(token);

if (!Settings.EnableEverythingContentSearch)
{
throw new EngineNotAvailableException(Enum.GetName(Settings.IndexSearchEngineOption.Everything)!,
Expand All @@ -74,16 +83,19 @@ public async IAsyncEnumerable<SearchResult> ContentSearchAsync(string plainSearc
_ =>
{
Settings.EnableEverythingContentSearch = true;

return ValueTask.FromResult(true);
});
}

if (token.IsCancellationRequested)
yield break;

var option = new EverythingSearchOption(plainSearch,
Settings.SortOption,
true,
contentSearch);
contentSearch,
IsFullPathSearch: Settings.EverythingSearchFullPath);

await foreach (var result in EverythingApi.SearchAsync(option, token))
{
Expand All @@ -93,13 +105,15 @@ public async IAsyncEnumerable<SearchResult> ContentSearchAsync(string plainSearc
public async IAsyncEnumerable<SearchResult> EnumerateAsync(string path, string search, bool recursive, [EnumeratorCancellation] CancellationToken token)
{
await ThrowIfEverythingNotAvailableAsync(token);

if (token.IsCancellationRequested)
yield break;

var option = new EverythingSearchOption(search,
Settings.SortOption,
ParentPath: path,
IsRecursive: recursive);
IsRecursive: recursive,
IsFullPathSearch: Settings.EverythingSearchFullPath);

await foreach (var result in EverythingApi.SearchAsync(option, token))
{
Expand Down
2 changes: 2 additions & 0 deletions Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ public enum ContentIndexSearchEngineOption
PathEnumerationEngine == PathEnumerationEngineOption.Everything ||
ContentSearchEngine == ContentIndexSearchEngineOption.Everything;

public bool EverythingSearchFullPath { get; set; } = false;

#endregion

internal enum ActionKeyword
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,15 @@
Header="{DynamicResource plugin_explorer_everything_setting_header}"
Style="{DynamicResource ExplorerTabItem}">
<StackPanel Margin="10" Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="10"
VerticalAlignment="Center"
Text="{DynamicResource flowlauncher_plugin_everything_search_fullpath}"/>
<CheckBox Margin="10"
VerticalAlignment="Center"
IsChecked="{Binding Settings.EverythingSearchFullPath}">
</CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Grid Margin="20,10,0,10">
<Grid.ColumnDefinitions>
Expand Down