Skip to content

Commit 86fc68b

Browse files
authored
Merge pull request #3114 from cibere/sys-plugin-add-copy-text
add CopyText and AutoCompleteText to some results in the sys plugin
2 parents 1f81ea0 + fe4fcf6 commit 86fc68b

File tree

1 file changed

+12
-3
lines changed
  • Plugins/Flow.Launcher.Plugin.Sys

1 file changed

+12
-3
lines changed

Plugins/Flow.Launcher.Plugin.Sys/Main.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ public void Init(PluginInitContext context)
131131
private List<Result> Commands()
132132
{
133133
var results = new List<Result>();
134+
var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version);
135+
var userDataPath = DataLocation.DataDirectory();
136+
var recycleBinFolder = "shell:RecycleBinFolder";
134137
results.AddRange(new[]
135138
{
136139
new Result
@@ -292,10 +295,11 @@ private List<Result> Commands()
292295
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_openrecyclebin"),
293296
IcoPath = "Images\\openrecyclebin.png",
294297
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"),
298+
CopyText = recycleBinFolder,
295299
Action = c =>
296300
{
297301
{
298-
System.Diagnostics.Process.Start("explorer", "shell:RecycleBinFolder");
302+
System.Diagnostics.Process.Start("explorer", recycleBinFolder);
299303
}
300304

301305
return true;
@@ -384,9 +388,10 @@ private List<Result> Commands()
384388
Title = "Open Log Location",
385389
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_log_location"),
386390
IcoPath = "Images\\app.png",
391+
CopyText = logPath,
392+
AutoCompleteText = logPath,
387393
Action = c =>
388394
{
389-
var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version);
390395
context.API.OpenDirectory(logPath);
391396
return true;
392397
}
@@ -396,6 +401,8 @@ private List<Result> Commands()
396401
Title = "Flow Launcher Tips",
397402
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_docs_tips"),
398403
IcoPath = "Images\\app.png",
404+
CopyText = Constant.Documentation,
405+
AutoCompleteText = Constant.Documentation,
399406
Action = c =>
400407
{
401408
context.API.OpenUrl(Constant.Documentation);
@@ -407,9 +414,11 @@ private List<Result> Commands()
407414
Title = "Flow Launcher UserData Folder",
408415
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location"),
409416
IcoPath = "Images\\app.png",
417+
CopyText = userDataPath,
418+
AutoCompleteText = userDataPath,
410419
Action = c =>
411420
{
412-
context.API.OpenDirectory(DataLocation.DataDirectory());
421+
context.API.OpenDirectory(userDataPath);
413422
return true;
414423
}
415424
},

0 commit comments

Comments
 (0)