mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'dev' into RemoveUnusedNuget
This commit is contained in:
commit
306ad7931b
42 changed files with 123 additions and 70 deletions
|
|
@ -48,6 +48,9 @@ namespace Flow.Launcher.Core.Plugin
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save json and ISavable
|
||||
/// </summary>
|
||||
public static void Save()
|
||||
{
|
||||
foreach (var plugin in AllPlugins)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Flow.Launcher.Infrastructure
|
|||
public static readonly string RootDirectory = Directory.GetParent(ApplicationDirectory).ToString();
|
||||
|
||||
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
|
||||
public const string Issue = "https://github.com/Flow-Launcher/Flow.Launcher/issues/new/choose";
|
||||
public const string IssuesUrl = "https://github.com/Flow-Launcher/Flow.Launcher/issues";
|
||||
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
|
||||
public static readonly string Dev = "Dev";
|
||||
public const string Documentation = "https://flowlauncher.com/docs/#/usage-tips";
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Flow.Launcher.Infrastructure.Exception
|
|||
sb.AppendLine($"* Command Line: {Environment.CommandLine}");
|
||||
sb.AppendLine($"* Timestamp: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}");
|
||||
sb.AppendLine($"* Flow Launcher version: {Constant.Version}");
|
||||
sb.AppendLine($"* OS Version: {Environment.OSVersion.VersionString}");
|
||||
sb.AppendLine($"* OS Version: {GetWindowsFullVersionFromRegistry()}");
|
||||
sb.AppendLine($"* IntPtr Length: {IntPtr.Size}");
|
||||
sb.AppendLine($"* x64: {Environment.Is64BitOperatingSystem}");
|
||||
sb.AppendLine($"* Python Path: {Constant.PythonPath}");
|
||||
|
|
@ -172,5 +172,35 @@ namespace Flow.Launcher.Infrastructure.Exception
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public static string GetWindowsFullVersionFromRegistry()
|
||||
{
|
||||
try
|
||||
{
|
||||
var buildRevision = GetWindowsRevisionFromRegistry();
|
||||
var currentBuild = Environment.OSVersion.Version.Build;
|
||||
return currentBuild.ToString() + "." + buildRevision;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Environment.OSVersion.VersionString;
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetWindowsRevisionFromRegistry()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\"))
|
||||
{
|
||||
var buildRevision = registryKey.GetValue("UBR").ToString();
|
||||
return buildRevision;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return "0";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
private const int permissibleFactor = 2;
|
||||
private SemaphoreSlim semaphore = new(1, 1);
|
||||
|
||||
public void Initialization(Dictionary<(string, bool), int> usage)
|
||||
public void Initialize(Dictionary<(string, bool), int> usage)
|
||||
{
|
||||
foreach (var key in usage.Keys)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
|
||||
var usage = LoadStorageToConcurrentDictionary();
|
||||
|
||||
ImageCache.Initialize(usage.ToDictionary(x => x.Key, x => x.Value));
|
||||
|
||||
foreach (var icon in new[]
|
||||
{
|
||||
Constant.DefaultIcon, Constant.MissingImgIcon
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public bool HideWhenDeactivated { get; set; } = true;
|
||||
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public SearchWindowScreens SearchWindowScreen { get; set; } = SearchWindowScreens.RememberLastLaunchLocation;
|
||||
public SearchWindowScreens SearchWindowScreen { get; set; } = SearchWindowScreens.Cursor;
|
||||
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public SearchWindowAligns SearchWindowAlign { get; set; } = SearchWindowAligns.Center;
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>4.0.0</Version>
|
||||
<PackageVersion>4.0.0</PackageVersion>
|
||||
<AssemblyVersion>4.0.0</AssemblyVersion>
|
||||
<FileVersion>4.0.0</FileVersion>
|
||||
<Version>4.0.1</Version>
|
||||
<PackageVersion>4.0.1</PackageVersion>
|
||||
<AssemblyVersion>4.0.1</AssemblyVersion>
|
||||
<FileVersion>4.0.1</FileVersion>
|
||||
<PackageId>Flow.Launcher.Plugin</PackageId>
|
||||
<Authors>Flow-Launcher</Authors>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
/// <param name="query">query text</param>
|
||||
/// <param name="requery">
|
||||
/// force requery By default, Flow Launcher will not fire query if your query is same with existing one.
|
||||
/// Set this to true to force Flow Launcher requerying
|
||||
/// Force requery. By default, Flow Launcher will not fire query if your query is same with existing one.
|
||||
/// Set this to <see langword="true"/> to force Flow Launcher requerying
|
||||
/// </param>
|
||||
void ChangeQuery(string query, bool requery = false);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Moq" Version="4.18.4" />
|
||||
<PackageReference Include="nunit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1">
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ namespace Flow.Launcher.Helper
|
|||
//prevent application exist, so the user can copy prompted error info
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
public static string RuntimeInfo()
|
||||
{
|
||||
var info = $"\nFlow Launcher version: {Constant.Version}" +
|
||||
$"\nOS Version: {Environment.OSVersion.VersionString}" +
|
||||
$"\nOS Version: {ExceptionFormatter.GetWindowsFullVersionFromRegistry()}" +
|
||||
$"\nIntPtr Length: {IntPtr.Size}" +
|
||||
$"\nx64: {Environment.Is64BitOperatingSystem}";
|
||||
return info;
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@
|
|||
<system:String x:Key="HotkeyUpDownDesc">Atrás / Menú Contextual</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">Navegación de Elemento</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">Abrir Menú Contextual</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Containing Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Abrir Carpeta Contenedora</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Run as Admin / Open Folder in Default File Manager</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">Historial de Consultas</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">Volver al Resultado en el Menú Contextual</system:String>
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Tienda de complementos</system:String>
|
||||
<system:String x:Key="pluginStore_NewRelease">Nuevo lanzamiento</system:String>
|
||||
<system:String x:Key="pluginStore_NewRelease">Nuevo(s) lanzamiento(s)</system:String>
|
||||
<system:String x:Key="pluginStore_RecentlyUpdated">Actualizado(s) recientemente</system:String>
|
||||
<system:String x:Key="pluginStore_None">Complementos</system:String>
|
||||
<system:String x:Key="pluginStore_Installed">Instalado(s)</system:String>
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@
|
|||
<system:String x:Key="HotkeyUpDownDesc">Indietro / Menu contestuale</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">Navigazione tra le voci</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">Apri il menu di scelta rapida</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Containing Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Apri cartella superiore</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Run as Admin / Open Folder in Default File Manager</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">Cronologia Query</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">Torna al risultato nel menu contestuale</system:String>
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@
|
|||
<system:String x:Key="HotkeyUpDownDesc">뒤로/ 콘텍스트 메뉴</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">아이템 이동</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">콘텍스트 메뉴 열기</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Containing Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">포함된 폴더 열기</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Run as Admin / Open Folder in Default File Manager</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">검색 기록</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">콘텍스트 메뉴에서 뒤로 가기</system:String>
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ Queira por favor mover a pasta do seu perfil de {0} para {1}
|
|||
<system:String x:Key="HotkeyUpDownDesc">Recuar/Menu de contexto</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">Navegação nos itens</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">Abrir menu de contexto</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Containing Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Abrir pasta do resultado</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Executar como administrador/Abrir pasta no gestor de ficheiros</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">Histórico de consultas</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">Voltar aos resultados no menu de contexto</system:String>
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@
|
|||
<system:String x:Key="HotkeyUpDownDesc">Назад / контекстное меню</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">Навигация по элементам</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">Открыть контекстное меню</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Containing Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Открыть папку с содержимым</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Запустить от имени администратора / Открыть папку в файловом менеджере по умолчанию</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">История запросов</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">Вернуться к результату в контекстном меню</system:String>
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@
|
|||
<system:String x:Key="HotkeyUpDownDesc">Späť/kontextová ponuka</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">Navigácia medzi položkami</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">Otvoriť kontextovú ponuku</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Containing Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Otvoriť umiestnenie priečinka</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Spustiť ako správca/Otvoriť priečinok v predvolenom správcovi súborov</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">História dopytov</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">Návrat na výsledky z kontextovej ponuky</system:String>
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@
|
|||
<system:String x:Key="HotkeyUpDownDesc">返回/上下文菜单</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">选项导航</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">打开上下文菜单</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Containing Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">打开所在目录</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">以管理员身份运行/在默认文件管理器中打开文件夹</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">查询历史</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">返回查询界面</system:String>
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@
|
|||
<system:String x:Key="HotkeyUpDownDesc">返回 / 快捷選單</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">Item Navigation</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">打開選單</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Containing Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">開啟檔案位置</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Run as Admin / Open Folder in Default File Manager</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">查詢歷史</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">Back to Result in Context Menu</system:String>
|
||||
|
|
|
|||
|
|
@ -69,13 +69,11 @@ namespace Flow.Launcher
|
|||
_viewModel.ResultCopy(QueryTextBox.SelectedText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async void OnClosing(object sender, CancelEventArgs e)
|
||||
{
|
||||
_settings.WindowTop = Top;
|
||||
_settings.WindowLeft = Left;
|
||||
_notifyIcon.Visible = false;
|
||||
_viewModel.Save();
|
||||
App.API.SaveAppAllSettings();
|
||||
e.Cancel = true;
|
||||
await PluginManager.DisposePluginsAsync();
|
||||
Notification.Uninstall();
|
||||
|
|
|
|||
|
|
@ -53,19 +53,12 @@ namespace Flow.Launcher
|
|||
// Temporary fix for the Windows 11 notification issue
|
||||
// Possibly from 22621.1413 or 22621.1485, judging by post time of #2024
|
||||
Log.Exception("Flow.Launcher.Notification|Notification InvalidOperationException Error", e);
|
||||
if (Environment.OSVersion.Version.Build >= 22621)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
LegacyShow(title, subTitle, iconPath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception("Flow.Launcher.Notification|Notification Error", e);
|
||||
throw;
|
||||
LegacyShow(title, subTitle, iconPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Flow.Launcher
|
|||
|
||||
public void SaveAppAllSettings()
|
||||
{
|
||||
SavePluginSettings();
|
||||
PluginManager.Save();
|
||||
_mainVM.Save();
|
||||
_settingsVM.Save();
|
||||
ImageLoader.Save();
|
||||
|
|
@ -158,6 +158,9 @@ namespace Flow.Launcher
|
|||
|
||||
private readonly ConcurrentDictionary<Type, object> _pluginJsonStorages = new();
|
||||
|
||||
/// <summary>
|
||||
/// Save plugin settings.
|
||||
/// </summary>
|
||||
public void SavePluginSettings()
|
||||
{
|
||||
foreach (var value in _pluginJsonStorages.Values)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Flow.Launcher
|
|||
SetException(exception);
|
||||
}
|
||||
|
||||
private static string GetIssueUrl(string website)
|
||||
private static string GetIssuesUrl(string website)
|
||||
{
|
||||
if (!website.StartsWith("https://github.com"))
|
||||
{
|
||||
|
|
@ -30,10 +30,10 @@ namespace Flow.Launcher
|
|||
}
|
||||
if(website.Contains("Flow-Launcher/Flow.Launcher"))
|
||||
{
|
||||
return Constant.Issue;
|
||||
return Constant.IssuesUrl;
|
||||
}
|
||||
var treeIndex = website.IndexOf("tree", StringComparison.Ordinal);
|
||||
return treeIndex == -1 ? $"{website}/issues/new" : $"{website[..treeIndex]}/issues/new";
|
||||
return treeIndex == -1 ? $"{website}/issues" : $"{website[..treeIndex]}/issues";
|
||||
}
|
||||
|
||||
private void SetException(Exception exception)
|
||||
|
|
@ -44,8 +44,8 @@ namespace Flow.Launcher
|
|||
|
||||
var websiteUrl = exception switch
|
||||
{
|
||||
FlowPluginException pluginException =>GetIssueUrl(pluginException.Metadata.Website),
|
||||
_ => Constant.Issue
|
||||
FlowPluginException pluginException =>GetIssuesUrl(pluginException.Metadata.Website),
|
||||
_ => Constant.IssuesUrl
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -85,4 +85,4 @@ namespace Flow.Launcher
|
|||
return paragraph;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ namespace Flow.Launcher
|
|||
settings.SettingWindowTop = Top;
|
||||
settings.SettingWindowLeft = Left;
|
||||
viewModel.Save();
|
||||
API.SavePluginSettings();
|
||||
}
|
||||
|
||||
private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save Flow settings. Plugins settings are not included.
|
||||
/// </summary>
|
||||
public void Save()
|
||||
{
|
||||
foreach (var vm in PluginViewModels)
|
||||
|
|
@ -143,7 +146,6 @@ namespace Flow.Launcher.ViewModel
|
|||
Settings.PluginSettings.Plugins[id].Priority = vm.Priority;
|
||||
}
|
||||
|
||||
PluginManager.Save();
|
||||
_storage.Save();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "Browser Bookmarks",
|
||||
"Description": "Search your browser bookmarks",
|
||||
"Author": "qianlifeng, Ioannis G.",
|
||||
"Version": "3.1.0",
|
||||
"Version": "3.1.1",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "Calculator",
|
||||
"Description": "Provide mathematical calculations.(Try 5*3-2 in Flow Launcher)",
|
||||
"Author": "cxfksword",
|
||||
"Version": "3.0.1",
|
||||
"Version": "3.0.2",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Caculator.dll",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"Name": "Explorer",
|
||||
"Description": "Find and manage files and folders via Windows Search or Everything",
|
||||
"Author": "Jeremy Wu",
|
||||
"Version": "3.0.1",
|
||||
"Version": "3.1.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "Plugin Indicator",
|
||||
"Description": "Provides plugin action keyword suggestions",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "3.0.0",
|
||||
"Version": "3.0.1",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.PluginIndicator.dll",
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
{
|
||||
// standard UrlSourceCode format in PluginsManifest's plugins.json file: https://github.com/jjw24/Flow.Launcher.Plugin.Putty/tree/master
|
||||
var link = pluginManifestInfo.UrlSourceCode.StartsWith("https://github.com")
|
||||
? Regex.Replace(pluginManifestInfo.UrlSourceCode, @"\/tree\/\w+$", "") + "/issues/new/choose"
|
||||
? Regex.Replace(pluginManifestInfo.UrlSourceCode, @"\/tree\/\w+$", "") + "/issues"
|
||||
: pluginManifestInfo.UrlSourceCode;
|
||||
|
||||
Context.API.OpenUrl(link);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"Name": "Plugins Manager",
|
||||
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
|
||||
"Author": "Jeremy Wu",
|
||||
"Version": "3.0.1",
|
||||
"Version": "3.0.2",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Flow.Launcher.Plugin.ProcessKiller
|
||||
{
|
||||
|
|
@ -17,13 +18,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
var termToSearch = query.Search;
|
||||
|
||||
var processlist = processHelper.GetMatchingProcesses(termToSearch);
|
||||
|
||||
return !processlist.Any()
|
||||
? null
|
||||
: CreateResultsFromProcesses(processlist, termToSearch);
|
||||
return CreateResultsFromQuery(query);
|
||||
}
|
||||
|
||||
public string GetTranslatedPluginTitle()
|
||||
|
|
@ -44,7 +39,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
// get all non-system processes whose file path matches that of the given result (processPath)
|
||||
var similarProcesses = processHelper.GetSimilarProcesses(processPath);
|
||||
|
||||
if (similarProcesses.Count() > 0)
|
||||
if (similarProcesses.Any())
|
||||
{
|
||||
menuOptions.Add(new Result
|
||||
{
|
||||
|
|
@ -66,8 +61,16 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
return menuOptions;
|
||||
}
|
||||
|
||||
private List<Result> CreateResultsFromProcesses(List<ProcessResult> processlist, string termToSearch)
|
||||
private List<Result> CreateResultsFromQuery(Query query)
|
||||
{
|
||||
string termToSearch = query.Search;
|
||||
var processlist = processHelper.GetMatchingProcesses(termToSearch);
|
||||
|
||||
if (!processlist.Any())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var results = new List<Result>();
|
||||
|
||||
foreach (var pr in processlist)
|
||||
|
|
@ -86,6 +89,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
Action = (c) =>
|
||||
{
|
||||
processHelper.TryKill(p);
|
||||
_ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
@ -110,7 +114,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
{
|
||||
processHelper.TryKill(p.Process);
|
||||
}
|
||||
|
||||
_ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
@ -118,5 +122,11 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
|
||||
return sortedResults;
|
||||
}
|
||||
|
||||
private static async Task DelayAndReQueryAsync(string query)
|
||||
{
|
||||
await Task.Delay(500);
|
||||
_context.API.ChangeQuery(query, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception($"|ProcessKiller.CreateResultsFromProcesses|Failed to kill process {p.ProcessName}", e);
|
||||
Log.Exception($"{nameof(ProcessHelper)}", $"Failed to kill process {p.ProcessName}", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name":"Process Killer",
|
||||
"Description":"Kill running processes from Flow",
|
||||
"Author":"Flow-Launcher",
|
||||
"Version":"3.0.0",
|
||||
"Version":"3.0.1",
|
||||
"Language":"csharp",
|
||||
"Website":"https://github.com/Flow-Launcher/Flow.Launcher.Plugin.ProcessKiller",
|
||||
"IcoPath":"Images\\app.png",
|
||||
|
|
|
|||
|
|
@ -465,7 +465,10 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
.SelectMany(p => EnumerateProgramsInDir(p, suffixes))
|
||||
.Distinct();
|
||||
|
||||
var startupPaths = GetStartupPaths();
|
||||
|
||||
var programs = ExceptDisabledSource(allPrograms)
|
||||
.Where(x => !startupPaths.Any(startup => FilesFolders.PathContains(startup, x)))
|
||||
.Select(x => GetProgramFromPath(x, protocols));
|
||||
return programs;
|
||||
}
|
||||
|
|
@ -716,6 +719,14 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
return new[] { userStartMenu, commonStartMenu };
|
||||
}
|
||||
|
||||
private static IEnumerable<string> GetStartupPaths()
|
||||
{
|
||||
var userStartup = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
|
||||
var commonStartup = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup);
|
||||
|
||||
return new[] { userStartup, commonStartup };
|
||||
}
|
||||
|
||||
public static void WatchProgramUpdate(Settings settings)
|
||||
{
|
||||
var paths = new List<string>();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "Program",
|
||||
"Description": "Search programs in Flow.Launcher",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "3.0.0",
|
||||
"Version": "3.1.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Program.dll",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "Shell",
|
||||
"Description": "Provide executing commands from Flow Launcher",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "3.0.1",
|
||||
"Version": "3.0.2",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Shell.dll",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "System Commands",
|
||||
"Description": "Provide System related commands. e.g. shutdown,lock, setting etc.",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "3.0.1",
|
||||
"Version": "3.0.2",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "URL",
|
||||
"Description": "Open the typed URL from Flow Launcher",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "3.0.1",
|
||||
"Version": "3.0.2",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Url.dll",
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
"Name": "Web Searches",
|
||||
"Description": "Provide the web search ability",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "3.0.1",
|
||||
"Version": "3.0.2",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Description": "Search settings inside Control Panel and Settings App",
|
||||
"Name": "Windows Settings",
|
||||
"Author": "TobiasSekan",
|
||||
"Version": "4.0.1",
|
||||
"Version": "4.0.2",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.WindowsSettings.dll",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
version: '1.14.0.{build}'
|
||||
version: '1.15.0.{build}'
|
||||
|
||||
init:
|
||||
- ps: |
|
||||
|
|
|
|||
Loading…
Reference in a new issue