mirror of
https://github.com/lin-ycv/EverythingPowerToys.git
synced 2025-01-08 11:57:59 +08:00
parent
0f5c9b177c
commit
e583ebf872
@ -1,127 +1,123 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<ProjectGuid>{64467D32-4786-4ADD-9B77-FBF3C965D3D1}</ProjectGuid>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Community.PowerToys.Run.Plugin.Everything</RootNamespace>
|
||||
<AssemblyName>Community.PowerToys.Run.Plugin.Everything</AssemblyName>
|
||||
<Version>$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)plugin.json').Split(',')[5].Split(':')[1].Trim().Trim('"'))</Version>
|
||||
<useWPF>true</useWPF>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<Platforms>x64</Platforms>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<Authors>Yu Chieh (Victor) Lin</Authors>
|
||||
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
|
||||
<ApplicationIcon />
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\..\..\..\..\x64\Debug\modules\launcher\Plugins\Everything\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Optimize>false</Optimize>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutputPath>..\..\..\..\..\x64\Release\modules\launcher\Plugins\Everything\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>none</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\..\codeAnalysis\GlobalSuppressions.cs">
|
||||
<Link>GlobalSuppressions.cs</Link>
|
||||
</Compile>
|
||||
<AdditionalFiles Include="..\..\..\..\codeAnalysis\StyleCop.json">
|
||||
<Link>StyleCop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj">
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="plugin.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Runtime" Version="4.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Everything64.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Everything.dark.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Everything.light.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Warning.dark.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Warning.light.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="del /Q "$(TargetDir)*.pdb"
del /Q "$(TargetDir)PowerToys*.dll"
rmdir /S /Q "$(TargetDir)\ref"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<ProjectGuid>{64467D32-4786-4ADD-9B77-FBF3C965D3D1}</ProjectGuid>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Community.PowerToys.Run.Plugin.Everything</RootNamespace>
|
||||
<AssemblyName>Community.PowerToys.Run.Plugin.Everything</AssemblyName>
|
||||
<Version>$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)plugin.json').Split(',')[5].Split(':')[1].Trim().Trim('"'))</Version>
|
||||
<useWPF>true</useWPF>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<Platforms>x64</Platforms>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<Authors>Yu Chieh (Victor) Lin</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\..\..\..\..\x64\Debug\modules\launcher\Plugins\Everything\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Optimize>false</Optimize>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutputPath>..\..\..\..\..\x64\Release\modules\launcher\Plugins\Everything\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\..\codeAnalysis\GlobalSuppressions.cs">
|
||||
<Link>GlobalSuppressions.cs</Link>
|
||||
</Compile>
|
||||
<AdditionalFiles Include="..\..\..\..\codeAnalysis\StyleCop.json">
|
||||
<Link>StyleCop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj">
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="plugin.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Runtime" Version="4.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Everything64.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Everything.dark.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Everything.ico.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Everything.light.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Warning.dark.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Warning.light.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="del /Q "$(TargetDir)*.pdb"
del /Q "$(TargetDir)PowerToys*.dll"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
@ -1,181 +1,181 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.Logger;
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything
|
||||
{
|
||||
internal class ContextMenuLoader : IContextMenu
|
||||
{
|
||||
private readonly PluginInitContext _context;
|
||||
|
||||
// Extensions for adding run as admin context menu item for applications
|
||||
private readonly string[] appExtensions = { ".exe", ".bat", ".appref-ms", ".lnk" };
|
||||
|
||||
public ContextMenuLoader(PluginInitContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log and show an error message")]
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
var contextMenus = new List<ContextMenuResult>();
|
||||
if (selectedResult.ContextData is SearchResult record)
|
||||
{
|
||||
bool isFile = Path.HasExtension(record.Path);
|
||||
|
||||
if (isFile)
|
||||
{
|
||||
contextMenus.Add(CreateOpenContainingFolderResult(record));
|
||||
}
|
||||
|
||||
// Test to check if File can be Run as admin, if yes, we add a 'run as admin' context menu item
|
||||
if (CanFileBeRunAsAdmin(record.Path))
|
||||
{
|
||||
contextMenus.Add(CreateRunAsAdminContextMenu(record));
|
||||
}
|
||||
|
||||
contextMenus.Add(new ContextMenuResult
|
||||
{
|
||||
PluginName = Assembly.GetExecutingAssembly().GetName().Name,
|
||||
Title = Properties.Resources.copy_path,
|
||||
Glyph = "\xE8C8",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.C,
|
||||
AcceleratorModifiers = ModifierKeys.Control,
|
||||
|
||||
Action = (context) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(record.Path);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
var message = Properties.Resources.clipboard_failed;
|
||||
Log.Exception(message, e, GetType());
|
||||
|
||||
_context.API.ShowMsg(message);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
});
|
||||
contextMenus.Add(new ContextMenuResult
|
||||
{
|
||||
PluginName = Assembly.GetExecutingAssembly().GetName().Name,
|
||||
Title = Properties.Resources.open_in_console,
|
||||
Glyph = "\xE756",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.C,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
|
||||
Action = (context) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (isFile)
|
||||
{
|
||||
Helper.OpenInConsole(Path.GetDirectoryName(record.Path));
|
||||
}
|
||||
else
|
||||
{
|
||||
Helper.OpenInConsole(record.Path);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception($"Failed to open {record.Path} in console, {e.Message}", e, GetType());
|
||||
return false;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return contextMenus;
|
||||
}
|
||||
|
||||
// Function to add the context menu item to run as admin
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log the exception message")]
|
||||
private static ContextMenuResult CreateRunAsAdminContextMenu(SearchResult record)
|
||||
{
|
||||
return new ContextMenuResult
|
||||
{
|
||||
PluginName = Assembly.GetExecutingAssembly().GetName().Name,
|
||||
Title = Properties.Resources.run_as_admin,
|
||||
Glyph = "\xE7EF",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.Enter,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
Action = _ =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Task.Run(() => Helper.RunAsAdmin(record.Path));
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception($"Failed to run {record.Path} as admin, {e.Message}", e, MethodBase.GetCurrentMethod().DeclaringType);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// Function to test if the file can be run as admin
|
||||
private bool CanFileBeRunAsAdmin(string path)
|
||||
{
|
||||
string fileExtension = Path.GetExtension(path);
|
||||
foreach (string extension in appExtensions)
|
||||
{
|
||||
// Using OrdinalIgnoreCase since this is internal
|
||||
if (extension.Equals(fileExtension, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log and show an error message")]
|
||||
private ContextMenuResult CreateOpenContainingFolderResult(SearchResult record)
|
||||
{
|
||||
return new ContextMenuResult
|
||||
{
|
||||
PluginName = Assembly.GetExecutingAssembly().GetName().Name,
|
||||
Title = Properties.Resources.open_containing_folder,
|
||||
Glyph = "\xE838",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.E,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
Action = _ =>
|
||||
{
|
||||
if (!Helper.OpenInShell("explorer.exe", $"/select,\"{record.Path}\""))
|
||||
{
|
||||
var message = $"{Properties.Resources.folder_open_failed} {record.Path}";
|
||||
_context.API.ShowMsg(message);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.Logger;
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything
|
||||
{
|
||||
internal class ContextMenuLoader : IContextMenu
|
||||
{
|
||||
private readonly PluginInitContext _context;
|
||||
|
||||
// Extensions for adding run as admin context menu item for applications
|
||||
private readonly string[] appExtensions = { ".exe", ".bat", ".appref-ms", ".lnk" };
|
||||
|
||||
public ContextMenuLoader(PluginInitContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log and show an error message")]
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
var contextMenus = new List<ContextMenuResult>();
|
||||
if (selectedResult.ContextData is SearchResult record)
|
||||
{
|
||||
bool isFile = Path.HasExtension(record.Path);
|
||||
|
||||
if (isFile)
|
||||
{
|
||||
contextMenus.Add(CreateOpenContainingFolderResult(record));
|
||||
}
|
||||
|
||||
// Test to check if File can be Run as admin, if yes, we add a 'run as admin' context menu item
|
||||
if (CanFileBeRunAsAdmin(record.Path))
|
||||
{
|
||||
contextMenus.Add(CreateRunAsAdminContextMenu(record));
|
||||
}
|
||||
|
||||
contextMenus.Add(new ContextMenuResult
|
||||
{
|
||||
PluginName = Assembly.GetExecutingAssembly().GetName().Name,
|
||||
Title = Properties.Resources.copy_path,
|
||||
Glyph = "\xE8C8",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.C,
|
||||
AcceleratorModifiers = ModifierKeys.Control,
|
||||
|
||||
Action = (context) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(record.Path);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
var message = Properties.Resources.clipboard_failed;
|
||||
Log.Exception(message, e, GetType());
|
||||
|
||||
_context.API.ShowMsg(message);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
});
|
||||
contextMenus.Add(new ContextMenuResult
|
||||
{
|
||||
PluginName = Assembly.GetExecutingAssembly().GetName().Name,
|
||||
Title = Properties.Resources.open_in_console,
|
||||
Glyph = "\xE756",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.C,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
|
||||
Action = (context) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (isFile)
|
||||
{
|
||||
Helper.OpenInConsole(Path.GetDirectoryName(record.Path));
|
||||
}
|
||||
else
|
||||
{
|
||||
Helper.OpenInConsole(record.Path);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception($"Failed to open {record.Path} in console, {e.Message}", e, GetType());
|
||||
return false;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return contextMenus;
|
||||
}
|
||||
|
||||
// Function to add the context menu item to run as admin
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log the exception message")]
|
||||
private static ContextMenuResult CreateRunAsAdminContextMenu(SearchResult record)
|
||||
{
|
||||
return new ContextMenuResult
|
||||
{
|
||||
PluginName = Assembly.GetExecutingAssembly().GetName().Name,
|
||||
Title = Properties.Resources.run_as_admin,
|
||||
Glyph = "\xE7EF",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.Enter,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
Action = _ =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Task.Run(() => Helper.RunAsAdmin(record.Path));
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception($"Failed to run {record.Path} as admin, {e.Message}", e, MethodBase.GetCurrentMethod().DeclaringType);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// Function to test if the file can be run as admin
|
||||
private bool CanFileBeRunAsAdmin(string path)
|
||||
{
|
||||
string fileExtension = Path.GetExtension(path);
|
||||
foreach (string extension in appExtensions)
|
||||
{
|
||||
// Using OrdinalIgnoreCase since this is internal
|
||||
if (extension.Equals(fileExtension, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log and show an error message")]
|
||||
private ContextMenuResult CreateOpenContainingFolderResult(SearchResult record)
|
||||
{
|
||||
return new ContextMenuResult
|
||||
{
|
||||
PluginName = Assembly.GetExecutingAssembly().GetName().Name,
|
||||
Title = Properties.Resources.open_containing_folder,
|
||||
Glyph = "\xE838",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = Key.E,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
Action = _ =>
|
||||
{
|
||||
if (!Helper.OpenInShell("explorer.exe", $"/select,\"{record.Path}\""))
|
||||
{
|
||||
var message = $"{Properties.Resources.folder_open_failed} {record.Path}";
|
||||
_context.API.ShowMsg(message);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
415
Main.cs
415
Main.cs
@ -1,208 +1,207 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Controls;
|
||||
using Community.PowerToys.Run.Plugin.Everything.Properties;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Infrastructure.Storage;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.Logger;
|
||||
using static Community.PowerToys.Run.Plugin.Everything.NativeMethods;
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything
|
||||
{
|
||||
public class Main : IPlugin, IDisposable, IDelayedExecutionPlugin, IContextMenu, ISettingProvider
|
||||
{
|
||||
private const string Wait = nameof(Wait);
|
||||
private const string Top = nameof(Top);
|
||||
private const string Preview = nameof(Preview);
|
||||
private readonly string reservedStringPattern = @"^[\/\\\$\%]+$|^.*[<>].*$";
|
||||
private bool _wait;
|
||||
private bool _top;
|
||||
private bool _preview;
|
||||
|
||||
public string Name => Resources.plugin_name;
|
||||
|
||||
public string Description => Resources.plugin_description;
|
||||
|
||||
public IEnumerable<PluginAdditionalOption> AdditionalOptions => new List<PluginAdditionalOption>()
|
||||
{
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
Key = Top,
|
||||
DisplayLabel = Resources.Top,
|
||||
Value = false,
|
||||
},
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
Key = Wait,
|
||||
DisplayLabel = Resources.Wait,
|
||||
Value = false,
|
||||
},
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
Key = Preview,
|
||||
DisplayLabel = Resources.Preview,
|
||||
Value = false,
|
||||
},
|
||||
};
|
||||
|
||||
private IContextMenu _contextMenuLoader;
|
||||
private PluginInitContext _context;
|
||||
private bool disposed;
|
||||
private static string _warningIconPath;
|
||||
|
||||
internal static string WarningIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
return _warningIconPath;
|
||||
}
|
||||
}
|
||||
|
||||
private static CancellationTokenSource source;
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
_context = context;
|
||||
_contextMenuLoader = new ContextMenuLoader(context);
|
||||
_context.API.ThemeChanged += OnThemeChanged;
|
||||
UpdateIconPath(_context.API.GetCurrentTheme());
|
||||
EverythingSetup();
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
return results;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive but will log the exception")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Already validated")]
|
||||
public List<Result> Query(Query query, bool isFullQuery)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
if (!string.IsNullOrEmpty(query.Search))
|
||||
{
|
||||
var searchQuery = query.Search;
|
||||
|
||||
var regexMatch = Regex.Match(searchQuery, reservedStringPattern);
|
||||
|
||||
if (!regexMatch.Success)
|
||||
{
|
||||
source?.Cancel();
|
||||
source = new CancellationTokenSource();
|
||||
CancellationToken token = source.Token;
|
||||
source.CancelAfter(_wait ? 1000 : 120);
|
||||
try
|
||||
{
|
||||
results.AddRange(EverythingSearch(searchQuery, _top, _preview, token));
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
results.Add(new Result()
|
||||
{
|
||||
Title = Resources.timeout,
|
||||
SubTitle = Resources.enable_wait,
|
||||
IcoPath = _warningIconPath,
|
||||
Score = int.MaxValue,
|
||||
});
|
||||
}
|
||||
catch (System.ComponentModel.Win32Exception)
|
||||
{
|
||||
results.Add(new Result()
|
||||
{
|
||||
Title = Resources.Everything_not_running,
|
||||
SubTitle = Resources.Everything_ini,
|
||||
IcoPath = _warningIconPath,
|
||||
QueryTextDisplay = '.' + Resources.plugin_name,
|
||||
Score = int.MaxValue,
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
source.Dispose();
|
||||
Log.Exception("Everything Exception", e, GetType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
private void OnThemeChanged(Theme oldtheme, Theme newTheme)
|
||||
{
|
||||
UpdateIconPath(newTheme);
|
||||
}
|
||||
|
||||
private static void UpdateIconPath(Theme theme)
|
||||
{
|
||||
if (theme == Theme.Light || theme == Theme.HighContrastWhite)
|
||||
{
|
||||
_warningIconPath = "Images/Warning.light.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
_warningIconPath = "Images/Warning.dark.png";
|
||||
}
|
||||
}
|
||||
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
return _contextMenuLoader.LoadContextMenus(selectedResult);
|
||||
}
|
||||
|
||||
public Control CreateSettingPanel()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UpdateSettings(PowerLauncherPluginSettings settings)
|
||||
{
|
||||
var wait = false;
|
||||
var top = false;
|
||||
var nopreview = false;
|
||||
if (settings != null && settings.AdditionalOptions != null)
|
||||
{
|
||||
wait = settings.AdditionalOptions.FirstOrDefault(x => x.Key == Wait)?.Value ?? false;
|
||||
top = settings.AdditionalOptions.FirstOrDefault(x => x.Key == Top)?.Value ?? false;
|
||||
nopreview = settings.AdditionalOptions.FirstOrDefault(x => x.Key == Preview)?.Value ?? false;
|
||||
}
|
||||
|
||||
_top = top;
|
||||
_wait = wait;
|
||||
_preview = nopreview;
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
source.Dispose();
|
||||
}
|
||||
|
||||
disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Controls;
|
||||
using Community.PowerToys.Run.Plugin.Everything.Properties;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Infrastructure.Storage;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.Logger;
|
||||
using static Community.PowerToys.Run.Plugin.Everything.NativeMethods;
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything
|
||||
{
|
||||
public class Main : IPlugin, IDisposable, IDelayedExecutionPlugin, IContextMenu, ISettingProvider
|
||||
{
|
||||
private const string Wait = nameof(Wait);
|
||||
private const string Top = nameof(Top);
|
||||
private const string NoPreview = nameof(NoPreview);
|
||||
private readonly string reservedStringPattern = @"^[\/\\\$\%]+$|^.*[<>].*$";
|
||||
private bool _wait;
|
||||
private bool _top;
|
||||
private bool _preview;
|
||||
|
||||
public string Name => Resources.plugin_name;
|
||||
|
||||
public string Description => Resources.plugin_description;
|
||||
|
||||
public IEnumerable<PluginAdditionalOption> AdditionalOptions => new List<PluginAdditionalOption>()
|
||||
{
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
Key = Top,
|
||||
DisplayLabel = Resources.Top,
|
||||
Value = false,
|
||||
},
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
Key = Wait,
|
||||
DisplayLabel = Resources.Wait,
|
||||
Value = false,
|
||||
},
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
Key = NoPreview,
|
||||
DisplayLabel = Resources.Preview,
|
||||
Value = false,
|
||||
},
|
||||
};
|
||||
|
||||
private IContextMenu _contextMenuLoader;
|
||||
private PluginInitContext _context;
|
||||
private bool disposed;
|
||||
private static string _warningIconPath;
|
||||
|
||||
internal static string WarningIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
return _warningIconPath;
|
||||
}
|
||||
}
|
||||
|
||||
private static CancellationTokenSource source;
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
_context = context;
|
||||
_contextMenuLoader = new ContextMenuLoader(context);
|
||||
_context.API.ThemeChanged += OnThemeChanged;
|
||||
UpdateIconPath(_context.API.GetCurrentTheme());
|
||||
EverythingSetup();
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
return results;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive but will log the exception")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Already validated")]
|
||||
public List<Result> Query(Query query, bool isFullQuery)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
if (!string.IsNullOrEmpty(query.Search))
|
||||
{
|
||||
var searchQuery = query.Search;
|
||||
|
||||
var regexMatch = Regex.Match(searchQuery, reservedStringPattern);
|
||||
|
||||
if (!regexMatch.Success)
|
||||
{
|
||||
source?.Cancel();
|
||||
source = new CancellationTokenSource();
|
||||
CancellationToken token = source.Token;
|
||||
source.CancelAfter(_wait ? 1000 : 150);
|
||||
try
|
||||
{
|
||||
results.AddRange(EverythingSearch(searchQuery, _top, _preview, token));
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
results.Add(new Result()
|
||||
{
|
||||
Title = Resources.timeout,
|
||||
SubTitle = Resources.enable_wait,
|
||||
IcoPath = _warningIconPath,
|
||||
Score = int.MaxValue,
|
||||
});
|
||||
}
|
||||
catch (System.ComponentModel.Win32Exception)
|
||||
{
|
||||
results.Add(new Result()
|
||||
{
|
||||
Title = Resources.Everything_not_running,
|
||||
SubTitle = Resources.Everything_ini,
|
||||
IcoPath = _warningIconPath,
|
||||
QueryTextDisplay = '.' + Resources.plugin_name,
|
||||
Score = int.MaxValue,
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
source.Cancel();
|
||||
Log.Exception("Everything Exception", e, GetType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
private void OnThemeChanged(Theme oldtheme, Theme newTheme)
|
||||
{
|
||||
UpdateIconPath(newTheme);
|
||||
}
|
||||
|
||||
private static void UpdateIconPath(Theme theme)
|
||||
{
|
||||
if (theme == Theme.Light || theme == Theme.HighContrastWhite)
|
||||
{
|
||||
_warningIconPath = "Images/Warning.light.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
_warningIconPath = "Images/Warning.dark.png";
|
||||
}
|
||||
}
|
||||
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
return _contextMenuLoader.LoadContextMenus(selectedResult);
|
||||
}
|
||||
|
||||
public Control CreateSettingPanel()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UpdateSettings(PowerLauncherPluginSettings settings)
|
||||
{
|
||||
var wait = false;
|
||||
var top = false;
|
||||
var nopreview = false;
|
||||
if (settings != null && settings.AdditionalOptions != null)
|
||||
{
|
||||
wait = settings.AdditionalOptions.FirstOrDefault(x => x.Key == Wait)?.Value ?? false;
|
||||
top = settings.AdditionalOptions.FirstOrDefault(x => x.Key == Top)?.Value ?? false;
|
||||
nopreview = settings.AdditionalOptions.FirstOrDefault(x => x.Key == NoPreview)?.Value ?? false;
|
||||
}
|
||||
|
||||
_top = top;
|
||||
_wait = wait;
|
||||
_preview = nopreview;
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
}
|
||||
|
||||
disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
465
NativeMethods.cs
465
NativeMethods.cs
@ -1,228 +1,237 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Community.PowerToys.Run.Plugin.Everything.Properties;
|
||||
using Microsoft.Win32;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything
|
||||
{
|
||||
internal static class NativeMethods
|
||||
{
|
||||
internal enum Request
|
||||
{
|
||||
FILE_NAME = 0x00000001,
|
||||
PATH = 0x00000002,
|
||||
FULL_PATH_AND_FILE_NAME = 0x00000004,
|
||||
EXTENSION = 0x00000008,
|
||||
SIZE = 0x00000010,
|
||||
DATE_CREATED = 0x00000020,
|
||||
DATE_MODIFIED = 0x00000040,
|
||||
DATE_ACCESSED = 0x00000080,
|
||||
ATTRIBUTES = 0x00000100,
|
||||
FILE_LIST_FILE_NAME = 0x00000200,
|
||||
RUN_COUNT = 0x00000400,
|
||||
DATE_RUN = 0x00000800,
|
||||
DATE_RECENTLY_CHANGED = 0x00001000,
|
||||
HIGHLIGHTED_FILE_NAME = 0x00002000,
|
||||
HIGHLIGHTED_PATH = 0x00004000,
|
||||
HIGHLIGHTED_FULL_PATH_AND_FILE_NAME = 0x00008000,
|
||||
}
|
||||
|
||||
internal enum Sort
|
||||
{
|
||||
NAME_ASCENDING = 1,
|
||||
NAME_DESCENDING,
|
||||
PATH_ASCENDING,
|
||||
PATH_DESCENDING,
|
||||
SIZE_ASCENDING,
|
||||
SIZE_DESCENDING,
|
||||
EXTENSION_ASCENDING,
|
||||
EXTENSION_DESCENDING,
|
||||
TYPE_NAME_ASCENDING,
|
||||
TYPE_NAME_DESCENDING,
|
||||
DATE_CREATED_ASCENDING,
|
||||
DATE_CREATED_DESCENDING,
|
||||
DATE_MODIFIED_ASCENDING,
|
||||
DATE_MODIFIED_DESCENDING,
|
||||
ATTRIBUTES_ASCENDING,
|
||||
ATTRIBUTES_DESCENDING,
|
||||
FILE_LIST_FILENAME_ASCENDING,
|
||||
FILE_LIST_FILENAME_DESCENDING,
|
||||
RUN_COUNT_ASCENDING,
|
||||
RUN_COUNT_DESCENDING,
|
||||
DATE_RECENTLY_CHANGED_ASCENDING,
|
||||
DATE_RECENTLY_CHANGED_DESCENDING,
|
||||
DATE_ACCESSED_ASCENDING,
|
||||
DATE_ACCESSED_DESCENDING,
|
||||
DATE_RUN_ASCENDING,
|
||||
DATE_RUN_DESCENDING,
|
||||
}
|
||||
|
||||
internal const string dllName = "Everything64.dll"; // Included dll is a modified file without locking, if this creates issues, replace with official dll
|
||||
|
||||
#pragma warning disable SA1516 // Elements should be separated by blank line
|
||||
[DllImport(dllName)]
|
||||
public static extern uint Everything_GetNumResults();
|
||||
[DllImport(dllName, CharSet = CharSet.Unicode)]
|
||||
public static extern void Everything_GetResultFullPathName(uint nIndex, StringBuilder lpString, uint nMaxCount);
|
||||
[DllImport(dllName)]
|
||||
public static extern bool Everything_QueryW(bool bWait);
|
||||
[DllImport(dllName)]
|
||||
public static extern void Everything_SetMax(uint dwMax);
|
||||
[DllImport(dllName)]
|
||||
public static extern void Everything_SetRequestFlags(Request RequestFlags);
|
||||
[DllImport(dllName, CharSet = CharSet.Unicode)]
|
||||
public static extern uint Everything_SetSearchW(string lpSearchString);
|
||||
[DllImport(dllName)]
|
||||
public static extern void Everything_SetSort(Sort SortType);
|
||||
|
||||
private const int max = 20;
|
||||
#pragma warning disable SA1503 // Braces should not be omitted
|
||||
public static void EverythingSetup()
|
||||
{
|
||||
Everything_SetRequestFlags(Request.FULL_PATH_AND_FILE_NAME);
|
||||
Everything_SetSort(Sort.DATE_MODIFIED_DESCENDING);
|
||||
Everything_SetMax(max);
|
||||
}
|
||||
|
||||
public static IEnumerable<Result> EverythingSearch(string qry, bool top, bool preview, CancellationToken token)
|
||||
{
|
||||
_ = Everything_SetSearchW(qry);
|
||||
if (token.IsCancellationRequested) token.ThrowIfCancellationRequested();
|
||||
if (!Everything_QueryW(true))
|
||||
{
|
||||
throw new Win32Exception("Unable to Query");
|
||||
}
|
||||
|
||||
uint resultCount = Everything_GetNumResults();
|
||||
|
||||
for (uint i = 0; i < resultCount; i++)
|
||||
{
|
||||
if (token.IsCancellationRequested) break;
|
||||
StringBuilder sb = new StringBuilder(260);
|
||||
Everything_GetResultFullPathName(i, sb, 260);
|
||||
string fullPath = sb.ToString();
|
||||
string name = Path.GetFileName(fullPath);
|
||||
string path;
|
||||
bool isFolder = Path.HasExtension(fullPath);
|
||||
if (isFolder)
|
||||
path = fullPath;
|
||||
else
|
||||
path = Path.GetDirectoryName(fullPath);
|
||||
string ext = Path.GetExtension(fullPath);
|
||||
|
||||
var r = new Result()
|
||||
{
|
||||
Title = name,
|
||||
ToolTipData = new ToolTipData("Name : " + name, "Path : " + path),
|
||||
SubTitle = Resources.plugin_name + ": " + fullPath,
|
||||
IcoPath = (preview || string.IsNullOrEmpty(ext) || string.IsNullOrEmpty((string)Icons[ext])) ? fullPath : (string)Icons[ext],
|
||||
ContextData = new SearchResult()
|
||||
{
|
||||
Path = fullPath,
|
||||
Title = name,
|
||||
},
|
||||
Action = e =>
|
||||
{
|
||||
using (var process = new Process())
|
||||
{
|
||||
process.StartInfo.FileName = fullPath;
|
||||
process.StartInfo.WorkingDirectory = path;
|
||||
process.StartInfo.UseShellExecute = true;
|
||||
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
return true;
|
||||
}
|
||||
catch (Win32Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
QueryTextDisplay = isFolder ? path : name,
|
||||
};
|
||||
if (top) r.Score = (int)(300 - i);
|
||||
yield return r;
|
||||
}
|
||||
|
||||
if (token.IsCancellationRequested)
|
||||
{
|
||||
yield return new Result()
|
||||
{
|
||||
Title = Resources.timeout,
|
||||
SubTitle = Resources.enable_wait,
|
||||
IcoPath = Main.WarningIcon,
|
||||
Score = int.MaxValue,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Credits https://www.codeproject.com/Articles/29137/Get-Registered-File-Types-and-Their-Associated-Ico
|
||||
[DllImport("shell32.dll", EntryPoint = "ExtractIconA", CharSet = CharSet.Unicode, SetLastError = true, ExactSpelling = true)]
|
||||
private static extern IntPtr ExtractIcon(int hInst, string lpszExeFileName, int nIconIndex);
|
||||
internal static readonly Hashtable Icons = GetFileTypeAndIcon();
|
||||
internal static Hashtable GetFileTypeAndIcon()
|
||||
{
|
||||
try
|
||||
{
|
||||
RegistryKey rkRoot = Registry.ClassesRoot;
|
||||
string[] keyNames = rkRoot.GetSubKeyNames();
|
||||
Hashtable iconsInfo = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
|
||||
foreach (string keyName in keyNames)
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyName))
|
||||
continue;
|
||||
int indexOfPoint = keyName.IndexOf(".", StringComparison.CurrentCulture);
|
||||
if (indexOfPoint != 0)
|
||||
continue;
|
||||
RegistryKey rkFileType = rkRoot.OpenSubKey(keyName);
|
||||
if (rkFileType == null)
|
||||
continue;
|
||||
object defaultValue = rkFileType.GetValue(string.Empty);
|
||||
if (defaultValue == null)
|
||||
continue;
|
||||
string defaultIcon = defaultValue.ToString() + "\\DefaultIcon";
|
||||
RegistryKey rkFileIcon = rkRoot.OpenSubKey(defaultIcon);
|
||||
if (rkFileIcon != null)
|
||||
{
|
||||
object value = rkFileIcon.GetValue(string.Empty);
|
||||
if (value != null)
|
||||
{
|
||||
string fileParam = value.ToString().Replace("\"", string.Empty, StringComparison.CurrentCulture).Split(',')[0].Trim();
|
||||
iconsInfo.Add(keyName, fileParam);
|
||||
}
|
||||
|
||||
rkFileIcon.Close();
|
||||
}
|
||||
|
||||
rkFileType.Close();
|
||||
}
|
||||
|
||||
rkRoot.Close();
|
||||
return iconsInfo;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#pragma warning restore SA1503 // Braces should not be omitted
|
||||
}
|
||||
}
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Community.PowerToys.Run.Plugin.Everything.Properties;
|
||||
using Microsoft.Win32;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything
|
||||
{
|
||||
internal static class NativeMethods
|
||||
{
|
||||
[Flags]
|
||||
internal enum Request
|
||||
{
|
||||
FILE_NAME = 0x00000001,
|
||||
PATH = 0x00000002,
|
||||
FULL_PATH_AND_FILE_NAME = 0x00000004,
|
||||
EXTENSION = 0x00000008,
|
||||
SIZE = 0x00000010,
|
||||
DATE_CREATED = 0x00000020,
|
||||
DATE_MODIFIED = 0x00000040,
|
||||
DATE_ACCESSED = 0x00000080,
|
||||
ATTRIBUTES = 0x00000100,
|
||||
FILE_LIST_FILE_NAME = 0x00000200,
|
||||
RUN_COUNT = 0x00000400,
|
||||
DATE_RUN = 0x00000800,
|
||||
DATE_RECENTLY_CHANGED = 0x00001000,
|
||||
HIGHLIGHTED_FILE_NAME = 0x00002000,
|
||||
HIGHLIGHTED_PATH = 0x00004000,
|
||||
HIGHLIGHTED_FULL_PATH_AND_FILE_NAME = 0x00008000,
|
||||
}
|
||||
|
||||
internal enum Sort
|
||||
{
|
||||
NAME_ASCENDING = 1,
|
||||
NAME_DESCENDING,
|
||||
PATH_ASCENDING,
|
||||
PATH_DESCENDING,
|
||||
SIZE_ASCENDING,
|
||||
SIZE_DESCENDING,
|
||||
EXTENSION_ASCENDING,
|
||||
EXTENSION_DESCENDING,
|
||||
TYPE_NAME_ASCENDING,
|
||||
TYPE_NAME_DESCENDING,
|
||||
DATE_CREATED_ASCENDING,
|
||||
DATE_CREATED_DESCENDING,
|
||||
DATE_MODIFIED_ASCENDING,
|
||||
DATE_MODIFIED_DESCENDING,
|
||||
ATTRIBUTES_ASCENDING,
|
||||
ATTRIBUTES_DESCENDING,
|
||||
FILE_LIST_FILENAME_ASCENDING,
|
||||
FILE_LIST_FILENAME_DESCENDING,
|
||||
RUN_COUNT_ASCENDING,
|
||||
RUN_COUNT_DESCENDING,
|
||||
DATE_RECENTLY_CHANGED_ASCENDING,
|
||||
DATE_RECENTLY_CHANGED_DESCENDING,
|
||||
DATE_ACCESSED_ASCENDING,
|
||||
DATE_ACCESSED_DESCENDING,
|
||||
DATE_RUN_ASCENDING,
|
||||
DATE_RUN_DESCENDING,
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct SHFILEINFO
|
||||
{
|
||||
internal IntPtr hIcon;
|
||||
internal int iIcon;
|
||||
internal int dwAttributes;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
|
||||
internal string szDisplayName;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
|
||||
internal string szTypeName;
|
||||
}
|
||||
|
||||
internal const string dllName = "Everything64.dll"; // Included dll is a modified file without locking, if this creates issues, replace with official dll
|
||||
|
||||
#pragma warning disable SA1516 // Elements should be separated by blank line
|
||||
[DllImport(dllName)]
|
||||
public static extern uint Everything_GetNumResults();
|
||||
[DllImport(dllName, CharSet = CharSet.Unicode)]
|
||||
public static extern void Everything_GetResultFullPathName(uint nIndex, StringBuilder lpString, uint nMaxCount);
|
||||
[DllImport(dllName)]
|
||||
public static extern bool Everything_QueryW(bool bWait);
|
||||
[DllImport(dllName)]
|
||||
public static extern void Everything_SetMax(uint dwMax);
|
||||
[DllImport(dllName)]
|
||||
public static extern void Everything_SetRequestFlags(Request RequestFlags);
|
||||
[DllImport(dllName, CharSet = CharSet.Unicode)]
|
||||
public static extern uint Everything_SetSearchW(string lpSearchString);
|
||||
[DllImport(dllName)]
|
||||
public static extern void Everything_SetSort(Sort SortType);
|
||||
|
||||
private const int max = 20;
|
||||
#pragma warning disable SA1503 // Braces should not be omitted
|
||||
public static void EverythingSetup()
|
||||
{
|
||||
Everything_SetRequestFlags(Request.FULL_PATH_AND_FILE_NAME);
|
||||
Everything_SetSort(Sort.DATE_MODIFIED_DESCENDING);
|
||||
Everything_SetMax(max);
|
||||
}
|
||||
|
||||
public static IEnumerable<Result> EverythingSearch(string qry, bool top, bool preview, CancellationToken token)
|
||||
{
|
||||
_ = Everything_SetSearchW(qry);
|
||||
if (token.IsCancellationRequested) token.ThrowIfCancellationRequested();
|
||||
if (!Everything_QueryW(true))
|
||||
{
|
||||
throw new Win32Exception("Unable to Query");
|
||||
}
|
||||
|
||||
uint resultCount = Everything_GetNumResults();
|
||||
|
||||
for (uint i = 0; i < resultCount; i++)
|
||||
{
|
||||
if (token.IsCancellationRequested) break;
|
||||
StringBuilder sb = new StringBuilder(260);
|
||||
Everything_GetResultFullPathName(i, sb, 260);
|
||||
string fullPath = sb.ToString();
|
||||
string name = Path.GetFileName(fullPath);
|
||||
string path;
|
||||
bool isFolder = Path.HasExtension(fullPath);
|
||||
if (isFolder)
|
||||
path = fullPath;
|
||||
else
|
||||
path = Path.GetDirectoryName(fullPath);
|
||||
string ext = Path.GetExtension(fullPath);
|
||||
|
||||
var r = new Result()
|
||||
{
|
||||
Title = name,
|
||||
ToolTipData = new ToolTipData("Name : " + name, "Path : " + path),
|
||||
SubTitle = Resources.plugin_name + ": " + fullPath,
|
||||
IcoPath = (preview || string.IsNullOrEmpty(ext)) ? fullPath : (string)Icons[ext],
|
||||
ContextData = new SearchResult()
|
||||
{
|
||||
Path = fullPath,
|
||||
Title = name,
|
||||
},
|
||||
Action = e =>
|
||||
{
|
||||
using (var process = new Process())
|
||||
{
|
||||
process.StartInfo.FileName = fullPath;
|
||||
process.StartInfo.WorkingDirectory = path;
|
||||
process.StartInfo.UseShellExecute = true;
|
||||
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
return true;
|
||||
}
|
||||
catch (Win32Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
QueryTextDisplay = isFolder ? path : name,
|
||||
};
|
||||
if (top) r.Score = (int)(max - i);
|
||||
yield return r;
|
||||
}
|
||||
|
||||
if (token.IsCancellationRequested)
|
||||
{
|
||||
yield return new Result()
|
||||
{
|
||||
Title = Resources.timeout,
|
||||
SubTitle = Resources.enable_wait,
|
||||
IcoPath = Main.WarningIcon,
|
||||
Score = int.MaxValue,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
internal static readonly Hashtable Icons = GetFileTypeAndIcon();
|
||||
internal static Hashtable GetFileTypeAndIcon()
|
||||
{
|
||||
try
|
||||
{
|
||||
RegistryKey rkRoot = Registry.ClassesRoot;
|
||||
string[] keyNames = rkRoot.GetSubKeyNames();
|
||||
Hashtable iconsInfo = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
|
||||
foreach (string keyName in keyNames)
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyName))
|
||||
continue;
|
||||
int indexOfPoint = keyName.IndexOf(".", StringComparison.CurrentCulture);
|
||||
if (indexOfPoint != 0)
|
||||
continue;
|
||||
RegistryKey rkFileType = rkRoot.OpenSubKey(keyName);
|
||||
if (rkFileType == null)
|
||||
continue;
|
||||
object defaultValue = rkFileType.GetValue(string.Empty);
|
||||
if (defaultValue == null)
|
||||
continue;
|
||||
string prog = defaultValue.ToString() + "\\shell\\Open\\command";
|
||||
RegistryKey rkFileIcon = rkRoot.OpenSubKey(prog);
|
||||
if (rkFileIcon != null)
|
||||
{
|
||||
object value = rkFileIcon.GetValue(string.Empty);
|
||||
if (value != null)
|
||||
{
|
||||
string fileParam = value.ToString().Split("\" ")[0].Replace("\"", string.Empty, StringComparison.CurrentCulture).Trim();
|
||||
iconsInfo.Add(keyName, fileParam);
|
||||
}
|
||||
|
||||
rkFileIcon.Close();
|
||||
}
|
||||
|
||||
rkFileType.Close();
|
||||
}
|
||||
|
||||
rkRoot.Close();
|
||||
return iconsInfo;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#pragma warning restore SA1503 // Braces should not be omitted
|
||||
}
|
||||
}
|
||||
|
396
Properties/Resources.Designer.cs
generated
396
Properties/Resources.Designer.cs
generated
@ -1,198 +1,198 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Community.PowerToys.Run.Plugin.Everything.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fail to set text in clipboard.
|
||||
/// </summary>
|
||||
public static string clipboard_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("clipboard_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy path (Ctrl+C).
|
||||
/// </summary>
|
||||
public static string copy_path {
|
||||
get {
|
||||
return ResourceManager.GetString("copy_path", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enable Wait setting under PowerToys Run > Everything.
|
||||
/// </summary>
|
||||
public static string enable_wait {
|
||||
get {
|
||||
return ResourceManager.GetString("enable_wait", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Install Everything if not installed.
|
||||
/// </summary>
|
||||
public static string Everything_ini {
|
||||
get {
|
||||
return ResourceManager.GetString("Everything_ini", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Everything is not running.
|
||||
/// </summary>
|
||||
public static string Everything_not_running {
|
||||
get {
|
||||
return ResourceManager.GetString("Everything_not_running", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fail to open folder at.
|
||||
/// </summary>
|
||||
public static string folder_open_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("folder_open_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open containing folder (Ctrl+Shift+E).
|
||||
/// </summary>
|
||||
public static string open_containing_folder {
|
||||
get {
|
||||
return ResourceManager.GetString("open_containing_folder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open path in console (Ctrl+Shift+C).
|
||||
/// </summary>
|
||||
public static string open_in_console {
|
||||
get {
|
||||
return ResourceManager.GetString("open_in_console", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Get search results from Everything.
|
||||
/// </summary>
|
||||
public static string plugin_description {
|
||||
get {
|
||||
return ResourceManager.GetString("plugin_description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Everything.
|
||||
/// </summary>
|
||||
public static string plugin_name {
|
||||
get {
|
||||
return ResourceManager.GetString("plugin_name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Preview - Preview file content as icon, may cause freezing if file not local..
|
||||
/// </summary>
|
||||
public static string Preview {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Run as administrator (Ctrl+Shift+Enter).
|
||||
/// </summary>
|
||||
public static string run_as_admin {
|
||||
get {
|
||||
return ResourceManager.GetString("run_as_admin", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Timed out before finishing the query.
|
||||
/// </summary>
|
||||
public static string timeout {
|
||||
get {
|
||||
return ResourceManager.GetString("timeout", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Top - Insert result at the top of the list, may cause pre-selection issue..
|
||||
/// </summary>
|
||||
public static string Top {
|
||||
get {
|
||||
return ResourceManager.GetString("Top", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Wait - Wait longer for the query to finish, enable only if prompted to..
|
||||
/// </summary>
|
||||
public static string Wait {
|
||||
get {
|
||||
return ResourceManager.GetString("Wait", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Community.PowerToys.Run.Plugin.Everything.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fail to set text in clipboard.
|
||||
/// </summary>
|
||||
public static string clipboard_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("clipboard_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy path (Ctrl+C).
|
||||
/// </summary>
|
||||
public static string copy_path {
|
||||
get {
|
||||
return ResourceManager.GetString("copy_path", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enable Wait setting under PowerToys Run > Everything.
|
||||
/// </summary>
|
||||
public static string enable_wait {
|
||||
get {
|
||||
return ResourceManager.GetString("enable_wait", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Install Everything if not installed.
|
||||
/// </summary>
|
||||
public static string Everything_ini {
|
||||
get {
|
||||
return ResourceManager.GetString("Everything_ini", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Everything is not running.
|
||||
/// </summary>
|
||||
public static string Everything_not_running {
|
||||
get {
|
||||
return ResourceManager.GetString("Everything_not_running", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fail to open folder at.
|
||||
/// </summary>
|
||||
public static string folder_open_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("folder_open_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open containing folder (Ctrl+Shift+E).
|
||||
/// </summary>
|
||||
public static string open_containing_folder {
|
||||
get {
|
||||
return ResourceManager.GetString("open_containing_folder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open path in console (Ctrl+Shift+C).
|
||||
/// </summary>
|
||||
public static string open_in_console {
|
||||
get {
|
||||
return ResourceManager.GetString("open_in_console", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Get search results from Everything.
|
||||
/// </summary>
|
||||
public static string plugin_description {
|
||||
get {
|
||||
return ResourceManager.GetString("plugin_description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Everything.
|
||||
/// </summary>
|
||||
public static string plugin_name {
|
||||
get {
|
||||
return ResourceManager.GetString("plugin_name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Preview - Preview file content as icon, may cause freezing if file is not local..
|
||||
/// </summary>
|
||||
public static string Preview {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Run as administrator (Ctrl+Shift+Enter).
|
||||
/// </summary>
|
||||
public static string run_as_admin {
|
||||
get {
|
||||
return ResourceManager.GetString("run_as_admin", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Timed out before finishing the query.
|
||||
/// </summary>
|
||||
public static string timeout {
|
||||
get {
|
||||
return ResourceManager.GetString("timeout", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Top - Insert result at the top of the list, may cause pre-selectino issue..
|
||||
/// </summary>
|
||||
public static string Top {
|
||||
get {
|
||||
return ResourceManager.GetString("Top", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Wait - Wait longer for the query to finish, enable only if prompted to..
|
||||
/// </summary>
|
||||
public static string Wait {
|
||||
get {
|
||||
return ResourceManager.GetString("Wait", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,165 +1,165 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="clipboard_failed" xml:space="preserve">
|
||||
<value>Fail to set text in clipboard</value>
|
||||
</data>
|
||||
<data name="copy_path" xml:space="preserve">
|
||||
<value>Copy path (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="enable_wait" xml:space="preserve">
|
||||
<value>Enable Wait setting under PowerToys Run > Everything</value>
|
||||
</data>
|
||||
<data name="Everything_ini" xml:space="preserve">
|
||||
<value>Install Everything if not installed</value>
|
||||
</data>
|
||||
<data name="Everything_not_running" xml:space="preserve">
|
||||
<value>Everything is not running</value>
|
||||
</data>
|
||||
<data name="folder_open_failed" xml:space="preserve">
|
||||
<value>Fail to open folder at</value>
|
||||
</data>
|
||||
<data name="open_containing_folder" xml:space="preserve">
|
||||
<value>Open containing folder (Ctrl+Shift+E)</value>
|
||||
</data>
|
||||
<data name="open_in_console" xml:space="preserve">
|
||||
<value>Open path in console (Ctrl+Shift+C)</value>
|
||||
</data>
|
||||
<data name="plugin_description" xml:space="preserve">
|
||||
<value>Get search results from Everything</value>
|
||||
</data>
|
||||
<data name="plugin_name" xml:space="preserve">
|
||||
<value>Everything</value>
|
||||
</data>
|
||||
<data name="Preview" xml:space="preserve">
|
||||
<value>Preview - Preview file content as icon, may cause freezing if file not local.</value>
|
||||
</data>
|
||||
<data name="run_as_admin" xml:space="preserve">
|
||||
<value>Run as administrator (Ctrl+Shift+Enter)</value>
|
||||
</data>
|
||||
<data name="timeout" xml:space="preserve">
|
||||
<value>Timed out before finishing the query</value>
|
||||
</data>
|
||||
<data name="Top" xml:space="preserve">
|
||||
<value>Top - Insert result at the top of the list, may cause pre-selection issue.</value>
|
||||
</data>
|
||||
<data name="Wait" xml:space="preserve">
|
||||
<value>Wait - Wait longer for the query to finish, enable only if prompted to.</value>
|
||||
</data>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="clipboard_failed" xml:space="preserve">
|
||||
<value>Fail to set text in clipboard</value>
|
||||
</data>
|
||||
<data name="copy_path" xml:space="preserve">
|
||||
<value>Copy path (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="enable_wait" xml:space="preserve">
|
||||
<value>Enable Wait setting under PowerToys Run > Everything</value>
|
||||
</data>
|
||||
<data name="Everything_ini" xml:space="preserve">
|
||||
<value>Install Everything if not installed</value>
|
||||
</data>
|
||||
<data name="Everything_not_running" xml:space="preserve">
|
||||
<value>Everything is not running</value>
|
||||
</data>
|
||||
<data name="folder_open_failed" xml:space="preserve">
|
||||
<value>Fail to open folder at</value>
|
||||
</data>
|
||||
<data name="open_containing_folder" xml:space="preserve">
|
||||
<value>Open containing folder (Ctrl+Shift+E)</value>
|
||||
</data>
|
||||
<data name="open_in_console" xml:space="preserve">
|
||||
<value>Open path in console (Ctrl+Shift+C)</value>
|
||||
</data>
|
||||
<data name="plugin_description" xml:space="preserve">
|
||||
<value>Get search results from Everything</value>
|
||||
</data>
|
||||
<data name="plugin_name" xml:space="preserve">
|
||||
<value>Everything</value>
|
||||
</data>
|
||||
<data name="Preview" xml:space="preserve">
|
||||
<value>Preview - Preview file content as icon, may cause freezing if file is not local.</value>
|
||||
</data>
|
||||
<data name="run_as_admin" xml:space="preserve">
|
||||
<value>Run as administrator (Ctrl+Shift+Enter)</value>
|
||||
</data>
|
||||
<data name="timeout" xml:space="preserve">
|
||||
<value>Timed out before finishing the query</value>
|
||||
</data>
|
||||
<data name="Top" xml:space="preserve">
|
||||
<value>Top - Insert result at the top of the list, may cause pre-selectino issue.</value>
|
||||
</data>
|
||||
<data name="Wait" xml:space="preserve">
|
||||
<value>Wait - Wait longer for the query to finish, enable only if prompted to.</value>
|
||||
</data>
|
||||
</root>
|
18
README.md
18
README.md
@ -1,9 +1,9 @@
|
||||
# Everything for PowerToys Run
|
||||
---
|
||||
This repo is to be used as a submodule for [PowerToys repo](https://github.com/lin-ycv/PowerToys/tree/Everything), this will not compile when used standalone, as it's missing references from PowerToys.
|
||||
|
||||
The release is the compiled reult of this repo, extract the downloaded folder to `C:\Program Files\PowerToys\modules\launcher\Plugins`
|
||||
|
||||
[Everything](https://www.voidtools.com/downloads/) has to be downloaded seperately, and be running in order for this pluging to work.<br>
|
||||
**\*This does not work with the lite version of Everything, it does not support IPC**<br>
|
||||
*if you are on 1.5 alpha, you need to [Disable 1.5a Instance](http://www.voidtools.com/forum/viewtopic.php?f=12&t=9799#instance)*
|
||||
# Everything for PowerToys Run
|
||||
---
|
||||
This repo is to be used as a submodule for [PowerToys repo](https://github.com/lin-ycv/PowerToys/tree/Everything), this will not compile when used standalone, as it's missing references from PowerToys.
|
||||
|
||||
The release is the compiled result of this repo, extract the downloaded folder to `C:\Program Files\PowerToys\modules\launcher\Plugins`
|
||||
|
||||
[Everything](https://www.voidtools.com/downloads/) has to be downloaded seperately, and be running in order for this pluging to work.<br>
|
||||
**\*This does not work with the lite version of Everything, it does not support IPC**<br>
|
||||
*if you are on 1.5 alpha, you need to [Disable 1.5a Instance](http://www.voidtools.com/forum/viewtopic.php?f=12&t=9799#instance)*
|
@ -1,15 +1,15 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything
|
||||
{
|
||||
public class SearchResult
|
||||
{
|
||||
// Contains the Path of the file or folder
|
||||
public string Path { get; set; }
|
||||
|
||||
// Contains the Title of the file or folder
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace Community.PowerToys.Run.Plugin.Everything
|
||||
{
|
||||
public class SearchResult
|
||||
{
|
||||
// Contains the Path of the file or folder
|
||||
public string Path { get; set; }
|
||||
|
||||
// Contains the Title of the file or folder
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
||||
|
24
plugin.json
24
plugin.json
@ -1,13 +1,13 @@
|
||||
{
|
||||
"ID": "A86867E2D932459CBD77D176373DD657",
|
||||
"ActionKeyword": "@",
|
||||
"IsGlobal": true,
|
||||
"Name": "Everything",
|
||||
"Author": "Yu Chieh (Victor) Lin",
|
||||
"Version": "0.55.1.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/lin-ycv/EverythingPowerToys",
|
||||
"ExecuteFileName": "Community.PowerToys.Run.Plugin.Everything.dll",
|
||||
"IcoPathDark": "Images\\Everything.dark.png",
|
||||
"IcoPathLight": "Images\\Everything.light.png"
|
||||
{
|
||||
"ID": "A86867E2D932459CBD77D176373DD657",
|
||||
"ActionKeyword": "@",
|
||||
"IsGlobal": true,
|
||||
"Name": "Everything",
|
||||
"Author": "Yu Chieh (Victor) Lin",
|
||||
"Version": "0.56.2.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/lin-ycv/EverythingPowerToys",
|
||||
"ExecuteFileName": "Community.PowerToys.Run.Plugin.Everything.dll",
|
||||
"IcoPathDark": "Images\\Everything.dark.png",
|
||||
"IcoPathLight": "Images\\Everything.light.png"
|
||||
}
|
Loading…
Reference in New Issue
Block a user