mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3114 from cibere/sys-plugin-add-copy-text
add CopyText and AutoCompleteText to some results in the sys plugin
This commit is contained in:
commit
86fc68b44b
1 changed files with 12 additions and 3 deletions
|
|
@ -131,6 +131,9 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
private List<Result> Commands()
|
||||
{
|
||||
var results = new List<Result>();
|
||||
var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version);
|
||||
var userDataPath = DataLocation.DataDirectory();
|
||||
var recycleBinFolder = "shell:RecycleBinFolder";
|
||||
results.AddRange(new[]
|
||||
{
|
||||
new Result
|
||||
|
|
@ -292,10 +295,11 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_openrecyclebin"),
|
||||
IcoPath = "Images\\openrecyclebin.png",
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"),
|
||||
CopyText = recycleBinFolder,
|
||||
Action = c =>
|
||||
{
|
||||
{
|
||||
System.Diagnostics.Process.Start("explorer", "shell:RecycleBinFolder");
|
||||
System.Diagnostics.Process.Start("explorer", recycleBinFolder);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -384,9 +388,10 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
Title = "Open Log Location",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_log_location"),
|
||||
IcoPath = "Images\\app.png",
|
||||
CopyText = logPath,
|
||||
AutoCompleteText = logPath,
|
||||
Action = c =>
|
||||
{
|
||||
var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version);
|
||||
context.API.OpenDirectory(logPath);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -396,6 +401,8 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
Title = "Flow Launcher Tips",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_docs_tips"),
|
||||
IcoPath = "Images\\app.png",
|
||||
CopyText = Constant.Documentation,
|
||||
AutoCompleteText = Constant.Documentation,
|
||||
Action = c =>
|
||||
{
|
||||
context.API.OpenUrl(Constant.Documentation);
|
||||
|
|
@ -407,9 +414,11 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
Title = "Flow Launcher UserData Folder",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location"),
|
||||
IcoPath = "Images\\app.png",
|
||||
CopyText = userDataPath,
|
||||
AutoCompleteText = userDataPath,
|
||||
Action = c =>
|
||||
{
|
||||
context.API.OpenDirectory(DataLocation.DataDirectory());
|
||||
context.API.OpenDirectory(userDataPath);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue