mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
commit
2af1f79505
21 changed files with 74 additions and 58 deletions
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Flow.Launcher.Plugin;
|
||||
|
||||
namespace Flow.Launcher.Core.Plugin
|
||||
|
|
@ -42,6 +43,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
|
||||
public class JsonRPCQueryResponseModel : JsonRPCResponseModel
|
||||
{
|
||||
[JsonPropertyName("result")]
|
||||
public new List<JsonRPCResult> Result { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -147,47 +147,42 @@ namespace Flow.Launcher.Core.Plugin
|
|||
{
|
||||
try
|
||||
{
|
||||
using (var process = Process.Start(startInfo))
|
||||
using var process = Process.Start(startInfo);
|
||||
if (process == null)
|
||||
{
|
||||
if (process != null)
|
||||
Log.Error("|JsonRPCPlugin.Execute|Can't start new process");
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
using var standardOutput = process.StandardOutput;
|
||||
var result = standardOutput.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
using (var standardError = process.StandardError)
|
||||
{
|
||||
using (var standardOutput = process.StandardOutput)
|
||||
var error = standardError.ReadToEnd();
|
||||
if (!string.IsNullOrEmpty(error))
|
||||
{
|
||||
var result = standardOutput.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
using (var standardError = process.StandardError)
|
||||
{
|
||||
var error = standardError.ReadToEnd();
|
||||
if (!string.IsNullOrEmpty(error))
|
||||
{
|
||||
Log.Error($"|JsonRPCPlugin.Execute|{error}");
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("|JsonRPCPlugin.Execute|Empty standard output and standard error.");
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (result.StartsWith("DEBUG:"))
|
||||
{
|
||||
MessageBox.Show(new Form { TopMost = true }, result.Substring(6));
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return result;
|
||||
}
|
||||
Log.Error($"|JsonRPCPlugin.Execute|{error}");
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("|JsonRPCPlugin.Execute|Empty standard output and standard error.");
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("|JsonRPCPlugin.Execute|Can't start new process");
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
else if (result.StartsWith("DEBUG:"))
|
||||
{
|
||||
MessageBox.Show(new Form { TopMost = true }, result.Substring(6));
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -183,6 +183,8 @@ namespace Flow.Launcher.Core.Plugin
|
|||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
token.ThrowIfCancellationRequested();
|
||||
if (results == null)
|
||||
return results;
|
||||
UpdatePluginMetadata(results, metadata, query);
|
||||
|
||||
metadata.QueryCount += 1;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@
|
|||
<Content Include="Images\*.svg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\*.ico">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
BIN
Flow.Launcher/Images/app.ico
Normal file
BIN
Flow.Launcher/Images/app.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
|
|
@ -40,8 +40,8 @@
|
|||
<!--Setting Plugin-->
|
||||
<system:String x:Key="plugin">Plugin</system:String>
|
||||
<system:String x:Key="browserMorePlugins">Nájsť ďalšie pluginy</system:String>
|
||||
<system:String x:Key="enable">Povoliť</system:String>
|
||||
<system:String x:Key="disable">Zakázať</system:String>
|
||||
<system:String x:Key="enable">Povolené</system:String>
|
||||
<system:String x:Key="disable">Zakázané</system:String>
|
||||
<system:String x:Key="actionKeywords">Skratka akcie</system:String>
|
||||
<system:String x:Key="currentActionKeywords">Aktuálna akcia skratky:</system:String>
|
||||
<system:String x:Key="newActionKeyword">Nová akcia skratky:</system:String>
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ namespace Flow.Launcher
|
|||
// which will cause ungraceful exit
|
||||
SaveAppAllSettings();
|
||||
|
||||
// Restart requires Squirrel's Update.exe to be present in the parent folder,
|
||||
// it is only published from the project's release pipeline. When debugging without it,
|
||||
// the project may not restart or just terminates. This is expected.
|
||||
UpdateManager.RestartApp(Constant.ApplicationFileName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
|
||||
x:Class="Flow.Launcher.SettingWindow"
|
||||
mc:Ignorable="d"
|
||||
Icon="Images\app.png"
|
||||
Icon="Images\app.ico"
|
||||
Title="{DynamicResource flowlauncher_settings}"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
|
||||
if (!match.IsSearchPrecisionScoreMet()) return false;
|
||||
|
||||
|
||||
r.Score = match.Score;
|
||||
return true;
|
||||
|
||||
|
|
@ -512,7 +512,7 @@ namespace Flow.Launcher.ViewModel
|
|||
await Task.Yield();
|
||||
|
||||
var results = await PluginManager.QueryForPlugin(plugin, query, currentCancellationToken);
|
||||
if (!currentCancellationToken.IsCancellationRequested)
|
||||
if (!currentCancellationToken.IsCancellationRequested && results != null)
|
||||
_resultsUpdateQueue.Post(new ResultsForUpdate(results, plugin.Metadata, query,
|
||||
currentCancellationToken));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Spracúva matematické operácie.(Skúste 5*3-2 vo flowlauncheri)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Nie je číslo (NaN)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Nesprávny alebo neúplný výraz (Nezabudli ste na zátvorky?)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Kopírovať toto číslo do schránky</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Kopírovať výsledok do schránky</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Oddeľovač des. miest</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Oddeľovač desatinných miest použitý vo výsledku.</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Použiť podľa systému</system:String>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Explorer.Search
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
{
|
||||
Title = Context.API.GetTranslation("plugin_pluginsmanager_plugin_contextmenu_openwebsite_title"),
|
||||
SubTitle = Context.API.GetTranslation("plugin_pluginsmanager_plugin_contextmenu_openwebsite_subtitle"),
|
||||
IcoPath = "Images\\website.png",
|
||||
IcoPath = selectedResult.IcoPath,
|
||||
Action = _ =>
|
||||
{
|
||||
SharedCommands.SearchWeb.NewTabInBrowser(pluginManifestInfo.Website);
|
||||
|
|
@ -63,7 +63,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
{
|
||||
Title = Context.API.GetTranslation("plugin_pluginsmanager_plugin_contextmenu_pluginsmanifest_title"),
|
||||
SubTitle = Context.API.GetTranslation("plugin_pluginsmanager_plugin_contextmenu_pluginsmanifest_subtitle"),
|
||||
IcoPath = selectedResult.IcoPath,
|
||||
IcoPath = "Images\\manifestsite.png",
|
||||
Action = _ =>
|
||||
{
|
||||
SharedCommands.SearchWeb.NewTabInBrowser("https://github.com/Flow-Launcher/Flow.Launcher.PluginsManifest");
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Flow.Launcher.Infrastructure\Flow.Launcher.Infrastructure.csproj" />
|
||||
<ProjectReference Include="..\..\Flow.Launcher.Core\Flow.Launcher.Core.csproj" />
|
||||
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
|
|
@ -7,7 +7,7 @@
|
|||
<system:String x:Key="plugin_pluginsmanager_please_wait">Čakajte, prosím…</system:String>
|
||||
<system:String x:Key="plugin_pluginsmanager_download_success">Úspešne stiahnuté</system:String>
|
||||
<system:String x:Key="plugin_pluginsmanager_uninstall_prompt">{0} od {1} {2}{3}Chcete odinštalovať tento plugin? Po odinštalovaní sa Flow automaticky reštartuje.</system:String>
|
||||
<system:String x:Key="plugin_pluginsmanager_install_prompt">{0} by {1} {2}{3}Chcete nainštalovať tento plugin? Po odinštalovaní sa Flow automaticky reštartuje.</system:String>
|
||||
<system:String x:Key="plugin_pluginsmanager_install_prompt">{0} by {1} {2}{3}Chcete nainštalovať tento plugin? Po nainštalovaní sa Flow automaticky reštartuje.</system:String>
|
||||
<system:String x:Key="plugin_pluginsmanager_install_title">Inštalovať plugin</system:String>
|
||||
<system:String x:Key="plugin_pluginsmanager_uninstall_title">Odinštalovať plugin</system:String>
|
||||
<system:String x:Key="plugin_pluginsmanager_install_errormetadatafile">Inštalácia zlyhala: nepodarilo sa nájsť metadáta súboru plugin.json nového pluginu</system:String>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
using Flow.Launcher.Core.Plugin;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.Http;
|
||||
using Flow.Launcher.Infrastructure.Logger;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin.PluginsManager.Models;
|
||||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
|
@ -327,7 +329,9 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
|
||||
var zipFilePath = Path.Combine(tempFolderPath, Path.GetFileName(downloadedFilePath));
|
||||
|
||||
File.Move(downloadedFilePath, zipFilePath);
|
||||
File.Copy(downloadedFilePath, zipFilePath);
|
||||
|
||||
File.Delete(downloadedFilePath);
|
||||
|
||||
Utilities.UnZip(zipFilePath, tempFolderPluginPath, true);
|
||||
|
||||
|
|
@ -345,7 +349,9 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
|
||||
string newPluginPath = Path.Combine(DataLocation.PluginsDirectory, $"{plugin.Name}-{plugin.Version}");
|
||||
|
||||
Directory.Move(pluginFolderPath, newPluginPath);
|
||||
FilesFolders.CopyAll(pluginFolderPath, newPluginPath);
|
||||
|
||||
Directory.Delete(pluginFolderPath, true);
|
||||
}
|
||||
|
||||
internal List<Result> RequestUninstall(string search)
|
||||
|
|
@ -395,6 +401,9 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
|
||||
private void Uninstall(PluginMetadata plugin)
|
||||
{
|
||||
PluginManager.Settings.Plugins.Remove(plugin.ID);
|
||||
PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID);
|
||||
|
||||
// Marked for deletion. Will be deleted on next start up
|
||||
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"Name": "Plugins Manager",
|
||||
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
|
||||
"Author": "Jeremy Wu",
|
||||
"Version": "1.6.1",
|
||||
"Version": "1.6.4",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_websearch_open_search_in">Otvoriť vyhľadávanie v:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_new_window">Nové okno</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_new_tab">Nová karta</system:String>
|
||||
<system:String x:Key="flowlaucnher_plugin_websearch_set_browser_path">Zadajte cestu k prehliadaču:</system:String>
|
||||
<system:String x:Key="flowlaucnher_plugin_websearch_set_browser_path">Cesta k prehliadaču:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_choose">Vybrať</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_delete">Odstrániť</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_edit">Upraviť</system:String>
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -20,10 +20,12 @@ Flow Launcher. Dedicated to make your workflow flow more seamlessly. Aimed at be
|
|||
|
||||
- Search everything from applications, files, bookmarks, YouTube, Twitter and more. All from the comfort of your keyboard without ever touching the mouse.
|
||||
- Search for file contents.
|
||||
- Support search using environment variable paths
|
||||
- Support search using environment variable paths.
|
||||
- Run batch and PowerShell commands as Administrator or a different user.
|
||||
- Support languages from Chinese to Italian and more.
|
||||
- Support of wide range of plugins.
|
||||
- Support wide range of plugins.
|
||||
- Prioritise the order of each plugin's results.
|
||||
- Save file or folder locations for quick access.
|
||||
- Fully portable.
|
||||
|
||||
[<img width="12px" src="https://user-images.githubusercontent.com/26427004/104119722-9033c600-5385-11eb-9d57-4c376862fd36.png"> **SOFTPEDIA EDITOR'S PICK**](https://www.softpedia.com/get/System/Launchers-Shutdown-Tools/Flow-Launcher.shtml)
|
||||
|
|
@ -45,13 +47,14 @@ Windows may complain about security due to code not being signed, this will be c
|
|||
|
||||
**Usage**
|
||||
- Open flow's search window: <kbd>Alt</kbd>+<kbd>Space</kbd> is the default hotkey.
|
||||
- Open context menu: <kbd>Ctrl</kbd>+<kbd>O</kbd>/<kbd>Shift</kbd>+<kbd>Enter</kbd>.
|
||||
- Search programs, bookmarks and control panel items with acronyms eg. `gk` or `gp` for GitKraken Preview; fuzzy search eg. `code` or `vis` for Visual Studio Code.
|
||||
- Open context menu: on the selected result, press <kbd>Ctrl</kbd>+<kbd>O</kbd>/<kbd>Shift</kbd>+<kbd>Enter</kbd>.
|
||||
- Cancel/Return to previous screen: <kbd>Esc</kbd>.
|
||||
- Install/Uninstall/Update plugins: in the search window, type `pm install`/`pm uninstall`/`pm update` + the plugin name.
|
||||
- Saved user settings are located:
|
||||
- If using roaming: `%APPDATA%\FlowLauncher`
|
||||
- If using portable, by default: `%localappdata%\FlowLauncher\app-<VersionOfYourFlowLauncher>\UserData`
|
||||
- Logs are saved along with your user settings folder
|
||||
- Logs are saved along with your user settings folder.
|
||||
|
||||
## Status
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: AssemblyVersion("1.7.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.7.0")]
|
||||
[assembly: AssemblyVersion("1.7.1")]
|
||||
[assembly: AssemblyFileVersion("1.7.1")]
|
||||
[assembly: AssemblyInformationalVersion("1.7.1")]
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
version: '1.7.0.{build}'
|
||||
version: '1.7.1.{build}'
|
||||
|
||||
init:
|
||||
- ps: |
|
||||
|
|
|
|||
Loading…
Reference in a new issue