diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..6abd850ed --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,23 @@ +# For more information, see: +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v4 + with: + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' + days-before-stale: 30 + days-before-close: 5 + days-before-pr-close: -1 + exempt-all-milestones: true + close-issue-message: 'This issue was closed because it has been stale for 5 days with no activity. If you feel this issue still needs attention please feel free to reopen.' \ No newline at end of file diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index 60c4ec3de..fdd23a0d2 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -1,7 +1,7 @@  - net5.0-windows + net6.0-windows true true Library @@ -53,7 +53,7 @@ - + diff --git a/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs b/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs index 515b0bedc..9d76b6be0 100644 --- a/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs @@ -15,20 +15,6 @@ namespace Flow.Launcher.Core.Plugin private readonly AssemblyName assemblyName; - private static readonly ConcurrentDictionary loadedAssembly; - - static PluginAssemblyLoader() - { - var currentAssemblies = AppDomain.CurrentDomain.GetAssemblies(); - loadedAssembly = new ConcurrentDictionary( - currentAssemblies.Select(x => new KeyValuePair(x.FullName, default))); - - AppDomain.CurrentDomain.AssemblyLoad += (sender, args) => - { - loadedAssembly[args.LoadedAssembly.FullName] = default; - }; - } - internal PluginAssemblyLoader(string assemblyFilePath) { dependencyResolver = new AssemblyDependencyResolver(assemblyFilePath); @@ -47,10 +33,9 @@ namespace Flow.Launcher.Core.Plugin // When resolving dependencies, ignore assembly depenedencies that already exits with Flow.Launcher // Otherwise duplicate assembly will be loaded and some weird behavior will occur, such as WinRT.Runtime.dll // will fail due to loading multiple versions in process, each with their own static instance of registration state - if (assemblyPath == null || ExistsInReferencedPackage(assemblyName)) - return null; + var existAssembly = Default.Assemblies.FirstOrDefault(x => x.FullName == assemblyName.FullName); - return LoadFromAssemblyPath(assemblyPath); + return existAssembly ?? (assemblyPath == null ? null : LoadFromAssemblyPath(assemblyPath)); } internal Type FromAssemblyGetTypeOfInterface(Assembly assembly, Type type) @@ -58,10 +43,5 @@ namespace Flow.Launcher.Core.Plugin var allTypes = assembly.ExportedTypes; return allTypes.First(o => o.IsClass && !o.IsAbstract && o.GetInterfaces().Any(t => t == type)); } - - internal bool ExistsInReferencedPackage(AssemblyName assemblyName) - { - return loadedAssembly.ContainsKey(assemblyName.FullName); - } } } \ No newline at end of file diff --git a/Flow.Launcher.Core/Resource/AvailableLanguages.cs b/Flow.Launcher.Core/Resource/AvailableLanguages.cs index 0ad7ede1e..f541d3f35 100644 --- a/Flow.Launcher.Core/Resource/AvailableLanguages.cs +++ b/Flow.Launcher.Core/Resource/AvailableLanguages.cs @@ -19,6 +19,8 @@ namespace Flow.Launcher.Core.Resource public static Language Serbian = new Language("sr", "Srpski"); public static Language Portuguese_Portugal = new Language("pt-pt", "Português"); public static Language Portuguese_Brazil = new Language("pt-br", "Português (Brasil)"); + public static Language Spanish = new Language("es", "Spanish"); + public static Language Spanish_LatinAmerica = new Language("es-419", "Spanish (Latin America)"); public static Language Italian = new Language("it", "Italiano"); public static Language Norwegian_Bokmal = new Language("nb-NO", "Norsk Bokmål"); public static Language Slovak = new Language("sk", "Slovenský"); @@ -43,6 +45,8 @@ namespace Flow.Launcher.Core.Resource Serbian, Portuguese_Portugal, Portuguese_Brazil, + Spanish, + Spanish_LatinAmerica, Italian, Norwegian_Bokmal, Slovak, diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 40c2cb956..930cf0b91 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -1,7 +1,7 @@  - net5.0-windows + net6.0-windows {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3} Library true diff --git a/Flow.Launcher.Infrastructure/Image/ImageCache.cs b/Flow.Launcher.Infrastructure/Image/ImageCache.cs index 13277c7d9..04e11bf1a 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageCache.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageCache.cs @@ -74,7 +74,7 @@ namespace Flow.Launcher.Infrastructure.Image // To delete the images from the data dictionary based on the resizing of the Usage Dictionary // Double Check to avoid concurrent remove if (Data.Count > permissibleFactor * MaxCached) - foreach (var key in Data.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key).ToArray()) + foreach (var key in Data.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key)) Data.TryRemove(key, out _); semaphore.Release(); } diff --git a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj index 6bab0583d..41072993c 100644 --- a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj +++ b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj @@ -1,7 +1,7 @@ - net5.0-windows + net6.0-windows {8451ECDD-2EA4-4966-BB0A-7BBC40138E80} true Library @@ -14,10 +14,10 @@ - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 + 3.0.0 + 3.0.0 + 3.0.0 + 3.0.0 Flow.Launcher.Plugin Flow-Launcher MIT diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index 133ad25a5..69057820e 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -228,8 +228,27 @@ namespace Flow.Launcher.Plugin public void OpenDirectory(string DirectoryPath, string FileName = null); /// - /// Opens the url. The browser and mode used is based on what's configured in Flow's default browser settings. + /// Opens the URL with the given Uri object. + /// The browser and mode used is based on what's configured in Flow's default browser settings. + /// + public void OpenUrl(Uri url, bool? inPrivate = null); + + /// + /// Opens the URL with the given string. + /// The browser and mode used is based on what's configured in Flow's default browser settings. + /// Non-C# plugins should use this method. /// public void OpenUrl(string url, bool? inPrivate = null); + + /// + /// Opens the application URI with the given Uri object, e.g. obsidian://search-query-example + /// + public void OpenAppUri(Uri appUri); + + /// + /// Opens the application URI with the given string, e.g. obsidian://search-query-example + /// Non-C# plugins should use this method + /// + public void OpenAppUri(string appUri); } } diff --git a/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs b/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs index 6c4ac8ebf..6588132b9 100644 --- a/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs +++ b/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs @@ -60,7 +60,7 @@ namespace Flow.Launcher.Plugin.SharedCommands try { - Process.Start(psi); + Process.Start(psi)?.Dispose(); } catch (System.ComponentModel.Win32Exception) { @@ -100,7 +100,7 @@ namespace Flow.Launcher.Plugin.SharedCommands psi.FileName = url; } - Process.Start(psi); + Process.Start(psi)?.Dispose(); } // This error may be thrown if browser path is incorrect catch (System.ComponentModel.Win32Exception) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index 8de0681c8..f429586ce 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -1,7 +1,7 @@  - net5.0-windows10.0.19041.0 + net6.0-windows10.0.19041.0 {FF742965-9A80-41A5-B042-D6C7D3A21708} Library Properties diff --git a/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs b/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs index 383650619..7231dfbe0 100644 --- a/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs +++ b/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs @@ -76,7 +76,7 @@ namespace Flow.Launcher.Test.Plugins [TestCaseSource(typeof(JsonRPCPluginTest), nameof(ResponseModelsSource))] public async Task GivenModel_WhenSerializeWithDifferentNamingPolicy_ThenExpectSameResult_Async(JsonRPCQueryResponseModel reference) { - var camelText = JsonSerializer.Serialize(reference, new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }); + var camelText = JsonSerializer.Serialize(reference, new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }); var pascalText = JsonSerializer.Serialize(reference); diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 35a6389ca..148179a7c 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -2,7 +2,7 @@ WinExe - net5.0-windows10.0.19041.0 + net6.0-windows10.0.19041.0 true true Flow.Launcher.App diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs index 98327d8da..a3ad20f77 100644 --- a/Flow.Launcher/Helper/HotKeyMapper.cs +++ b/Flow.Launcher/Helper/HotKeyMapper.cs @@ -25,7 +25,7 @@ namespace Flow.Launcher.Helper internal static void OnToggleHotkey(object sender, HotkeyEventArgs args) { - if (!mainViewModel.GameModeStatus) + if (!mainViewModel.ShouldIgnoreHotkeys() && !mainViewModel.GameModeStatus) mainViewModel.ToggleFlowLauncher(); } diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 25de530bc..6ec3bb4ef 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -58,7 +58,7 @@ Shadow effect is not allowed while current theme has blur effect enabled - Plugins + Plugin Find more plugins On Off diff --git a/Flow.Launcher/Properties/PublishProfiles/Net5.0-SelfContained.pubxml b/Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml similarity index 76% rename from Flow.Launcher/Properties/PublishProfiles/Net5.0-SelfContained.pubxml rename to Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml index 124792e3e..23867d894 100644 --- a/Flow.Launcher/Properties/PublishProfiles/Net5.0-SelfContained.pubxml +++ b/Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml @@ -1,13 +1,13 @@ - + FileSystem Release Any CPU - net5.0-windows10.0.19041.0 + net6.0-windows10.0.19041.0 ..\Output\Release\ win-x64 true @@ -15,4 +15,4 @@ https://go.microsoft.com/fwlink/?LinkID=208121. False False - \ No newline at end of file + diff --git a/Flow.Launcher/Properties/PublishProfiles/NetCore3.1-SelfContained.pubxml.user b/Flow.Launcher/Properties/PublishProfiles/NetCore3.1-SelfContained.pubxml.user deleted file mode 100644 index 312c6e3b8..000000000 --- a/Flow.Launcher/Properties/PublishProfiles/NetCore3.1-SelfContained.pubxml.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 5b490bede..81f7a2389 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -209,21 +209,53 @@ namespace Flow.Launcher explorer.Start(); } - public void OpenUrl(string url, bool? inPrivate = null) + private void OpenUri(Uri uri, bool? inPrivate = null) { - var browserInfo = _settingsVM.Settings.CustomBrowser; - - var path = browserInfo.Path == "*" ? "" : browserInfo.Path; - - if (browserInfo.OpenInTab) + if (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) { - url.OpenInBrowserTab(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg); + var browserInfo = _settingsVM.Settings.CustomBrowser; + + var path = browserInfo.Path == "*" ? "" : browserInfo.Path; + + if (browserInfo.OpenInTab) + { + uri.AbsoluteUri.OpenInBrowserTab(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg); + } + else + { + uri.AbsoluteUri.OpenInBrowserWindow(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg); + } } else { - url.OpenInBrowserWindow(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg); - } + Process.Start(new ProcessStartInfo() + { + FileName = uri.AbsoluteUri, + UseShellExecute = true + })?.Dispose(); + return; + } + } + + public void OpenUrl(string url, bool? inPrivate = null) + { + OpenUri(new Uri(url), inPrivate); + } + + public void OpenUrl(Uri url, bool? inPrivate = null) + { + OpenUri(url, inPrivate); + } + + public void OpenAppUri(string appUri) + { + OpenUri(new Uri(appUri)); + } + + public void OpenAppUri(Uri appUri) + { + OpenUri(appUri); } public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent; @@ -254,4 +286,4 @@ namespace Flow.Launcher #endregion } -} +} \ No newline at end of file diff --git a/Flow.Launcher/Themes/Base.xaml b/Flow.Launcher/Themes/Base.xaml index 454904f3a..087606d04 100644 --- a/Flow.Launcher/Themes/Base.xaml +++ b/Flow.Launcher/Themes/Base.xaml @@ -1,15 +1,16 @@ - + - + - - - + - - + + - - - - + @@ -152,7 +158,7 @@ - + @@ -160,44 +166,50 @@ - - + + - - + + - + - + @@ -249,12 +263,12 @@ - - + + - - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs index a49f8cb94..e20a476c5 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs @@ -40,7 +40,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark return new(); foreach (var folder in rootElement.EnumerateObject()) { - EnumerateFolderBookmark(folder.Value, bookmarks, source); + if (folder.Value.ValueKind == JsonValueKind.Object) + EnumerateFolderBookmark(folder.Value, bookmarks, source); } return bookmarks; } @@ -67,4 +68,4 @@ namespace Flow.Launcher.Plugin.BrowserBookmark } } -} \ No newline at end of file +} diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj index 2a586818c..8454b11e6 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows + net6.0-windows true {9B130CC5-14FB-41FF-B310-0A95B6894C37} Properties diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj index d7dd507dc..0fe809926 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows + net6.0-windows {59BD9891-3837-438A-958D-ADC7F91F6F7E} Properties Flow.Launcher.Plugin.Caculator diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs index 7de4d30fe..ea278b49b 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs @@ -6,7 +6,6 @@ using System.Text.RegularExpressions; using System.Windows; using System.Windows.Controls; using Mages.Core; -using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Plugin.Caculator.ViewModels; using Flow.Launcher.Plugin.Caculator.Views; @@ -25,6 +24,9 @@ namespace Flow.Launcher.Plugin.Caculator @")+$", RegexOptions.Compiled); private static readonly Regex RegBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled); private static Engine MagesEngine; + private const string comma = ","; + private const string dot = "."; + private PluginInitContext Context { get; set; } private static Settings _settings; @@ -35,7 +37,7 @@ namespace Flow.Launcher.Plugin.Caculator Context = context; _settings = context.API.LoadSettingJsonStorage(); _viewModel = new SettingsViewModel(_settings); - + MagesEngine = new Engine(new Configuration { Scope = new Dictionary @@ -54,7 +56,19 @@ namespace Flow.Launcher.Plugin.Caculator try { - var expression = query.Search.Replace(",", "."); + string expression; + + switch (_settings.DecimalSeparator) + { + case DecimalSeparator.Comma: + case DecimalSeparator.UseSystemLocale when CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator == ",": + expression = query.Search.Replace(",", "."); + break; + default: + expression = query.Search; + break; + } + var result = MagesEngine.Interpret(expression); if (result?.ToString() == "NaN") @@ -76,6 +90,7 @@ namespace Flow.Launcher.Plugin.Caculator IcoPath = "Images/calculator.png", Score = 300, SubTitle = Context.API.GetTranslation("flowlauncher_plugin_calculator_copy_number_to_clipboard"), + CopyText = newResult, Action = c => { try @@ -119,6 +134,10 @@ namespace Flow.Launcher.Plugin.Caculator return false; } + if ((query.Search.Contains(dot) && GetDecimalSeparator() != dot) || + (query.Search.Contains(comma) && GetDecimalSeparator() != comma)) + return false; + return true; } @@ -142,8 +161,8 @@ namespace Flow.Launcher.Plugin.Caculator switch (_settings.DecimalSeparator) { case DecimalSeparator.UseSystemLocale: return systemDecimalSeperator; - case DecimalSeparator.Dot: return "."; - case DecimalSeparator.Comma: return ","; + case DecimalSeparator.Dot: return dot; + case DecimalSeparator.Comma: return comma; default: return systemDecimalSeperator; } } diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Settings.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Settings.cs index 10cee364b..615514873 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Settings.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - + namespace Flow.Launcher.Plugin.Caculator { public class Settings diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json b/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json index 0b0921868..771babb90 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json @@ -4,7 +4,7 @@ "Name": "Calculator", "Description": "Provide mathematical calculations.(Try 5*3-2 in Flow Launcher)", "Author": "cxfksword", - "Version": "1.1.9", + "Version": "1.1.10", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Caculator.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj index 8f9466794..b4ab89a36 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows + net6.0-windows true true true diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml index bbaacc18c..a7fa58643 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml @@ -89,6 +89,7 @@ Library - net5.0-windows + net6.0-windows {FDED22C8-B637-42E8-824A-63B5B6E05A3A} Properties Flow.Launcher.Plugin.PluginIndicator diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj index 62534ef98..2b773bee4 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj @@ -1,7 +1,7 @@  Library - net5.0-windows + net6.0-windows true true true @@ -38,6 +38,6 @@ - + \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json index 6e74fa9e4..0bee472d9 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json @@ -6,7 +6,7 @@ "Name": "Plugins Manager", "Description": "Management of installing, uninstalling or updating Flow Launcher plugins", "Author": "Jeremy Wu", - "Version": "1.12.1", + "Version": "1.12.2", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll", diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj index 799230b10..80642c8a3 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows + net6.0-windows Flow.Launcher.Plugin.ProcessKiller Flow.Launcher.Plugin.ProcessKiller Flow-Launcher diff --git a/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj b/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj index 2eb04b5a9..2809e0b5c 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj +++ b/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows10.0.19041.0 + net6.0-windows10.0.19041.0 {FDB3555B-58EF-4AE6-B5F1-904719637AB4} Properties Flow.Launcher.Plugin.Program diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj b/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj index 03b2d5a40..5ebfd6d54 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj +++ b/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows + net6.0-windows {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0} Properties Flow.Launcher.Plugin.Shell diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs b/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs index 042fd0dd3..a3cac1cb8 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs @@ -6,7 +6,7 @@ namespace Flow.Launcher.Plugin.Shell { public Shell Shell { get; set; } = Shell.Cmd; - public bool ReplaceWinR { get; set; } = true; + public bool ReplaceWinR { get; set; } = false; public bool LeaveShellOpen { get; set; } diff --git a/Plugins/Flow.Launcher.Plugin.Shell/plugin.json b/Plugins/Flow.Launcher.Plugin.Shell/plugin.json index 5871432c9..357e73f8c 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Shell/plugin.json @@ -9,4 +9,4 @@ "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Shell.dll", "IcoPath": "Images\\shell.png" -} +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj index 01827370a..55ab2780e 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj +++ b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows + net6.0-windows {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} Properties Flow.Launcher.Plugin.Sys diff --git a/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj b/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj index ea0b4b7d2..8d50a80e2 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj +++ b/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows + net6.0-windows {A3DCCBCA-ACC1-421D-B16E-210896234C26} true Properties diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj b/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj index cd0bbdee3..f238c4e93 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj @@ -2,7 +2,7 @@ Library - net5.0-windows + net6.0-windows {403B57F2-1856-4FC7-8A24-36AB346B763E} Properties true diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs index 2ed412130..b136e3b8b 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs @@ -49,9 +49,10 @@ namespace Flow.Launcher.Plugin.WebSearch var title = keyword; string subtitle = _context.API.GetTranslation("flowlauncher_plugin_websearch_search") + " " + searchSource.Title; - //Action Keyword match apear on top + // Action Keyword match apear on top var score = searchSource.ActionKeyword == SearchSourceGlobalPluginWildCardSign ? scoreStandard : scoreStandard + 1; + // This populates the associated action keyword search entry if (string.IsNullOrEmpty(keyword)) { var result = new Result @@ -61,6 +62,7 @@ namespace Flow.Launcher.Plugin.WebSearch IcoPath = searchSource.IconPath, Score = score }; + results.Add(result); } else @@ -93,7 +95,6 @@ namespace Flow.Launcher.Plugin.WebSearch if (token.IsCancellationRequested) return null; - } return results; diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs index f54dbc13c..2495abe66 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs @@ -62,4 +62,4 @@ namespace Flow.Launcher.Plugin.WebSearch return ImageLoader.Load(pathToPreviewIconImage); } } -} \ No newline at end of file +} diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs index 19e996b84..6cf1446af 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs @@ -225,4 +225,4 @@ namespace Flow.Launcher.Plugin.WebSearch public bool OpenInNewBrowser { get; set; } = true; } -} \ No newline at end of file +} diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj index c30fbf997..81ea31c21 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj @@ -1,7 +1,7 @@ - + Library - net5.0-windows + net6.0-windows true true false diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs index 3005567c4..c693331e9 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs @@ -34,8 +34,9 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper var resultList = new List(); foreach (var entry in list) { - const int highScore = 20; - const int midScore = 10; + // Adjust the score to lower the order of many irrelevant matches from area strings + // that may only be for description. + const int nonNameMatchScoreAdj = 10; Result? result; Debug.Assert(_api != null, nameof(_api) + " != null"); @@ -44,7 +45,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper if (nameMatch.IsSearchPrecisionScoreMet()) { - var settingResult = NewSettingResult(nameMatch.Score + highScore, entry.Type); + var settingResult = NewSettingResult(nameMatch.Score, entry.Type); settingResult.TitleHighlightData = nameMatch.MatchData; result = settingResult; } @@ -53,7 +54,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper var areaMatch = _api.FuzzySearch(query.Search, entry.Area); if (areaMatch.IsSearchPrecisionScoreMet()) { - var settingResult = NewSettingResult(areaMatch.Score + midScore, entry.Type); + var settingResult = NewSettingResult(areaMatch.Score - nonNameMatchScoreAdj, entry.Type); result = settingResult; } else @@ -61,7 +62,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper result = entry.AltNames? .Select(altName => _api.FuzzySearch(query.Search, altName)) .Where(match => match.IsSearchPrecisionScoreMet()) - .Select(altNameMatch => NewSettingResult(altNameMatch.Score + midScore, entry.Type)) + .Select(altNameMatch => NewSettingResult(altNameMatch.Score - nonNameMatchScoreAdj, entry.Type)) .FirstOrDefault(); } @@ -75,7 +76,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper .SelectMany(x => x) .Contains(x, StringComparer.CurrentCultureIgnoreCase)) ) - result = NewSettingResult(midScore, entry.Type); + result = NewSettingResult(nonNameMatchScoreAdj, entry.Type); } } @@ -115,7 +116,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper private static void AddOptionalToolTip(WindowsSetting entry, Result result) { var toolTipText = new StringBuilder(); - + var settingType = entry.Type == "AppSettingsApp" ? "System settings" : "Control Panel"; toolTipText.AppendLine($"{Resources.Application}: {settingType}"); diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.resx index 6bb283e7b..dc6895d21 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.resx +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.resx @@ -1,4 +1,4 @@ - +