From 6410853e34d5b9cd9167226629056d91b5b83153 Mon Sep 17 00:00:00 2001 From: cibere <71997063+cibere@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:38:28 -0800 Subject: [PATCH 1/3] add `CopyText` to recyclebin, log folder, flow tips, and userdata folder results in sys plugin --- Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs index 1ec07915d2b..a11a169deba 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs @@ -133,6 +133,8 @@ public void Init(PluginInitContext context) private List Commands() { var results = new List(); + var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version); + var userDataPath = DataLocation.DataDirectory() results.AddRange(new[] { new Result @@ -294,6 +296,7 @@ private List Commands() SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_openrecyclebin"), IcoPath = "Images\\openrecyclebin.png", Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"), + CopyText = "shell:RecycleBinFolder", Action = c => { { @@ -386,9 +389,9 @@ private List Commands() Title = "Open Log Location", SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_log_location"), IcoPath = "Images\\app.png", + CopyText = logPath, Action = c => { - var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version); context.API.OpenDirectory(logPath); return true; } @@ -398,6 +401,7 @@ private List Commands() Title = "Flow Launcher Tips", SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_docs_tips"), IcoPath = "Images\\app.png", + CopyText = Constant.Documentation, Action = c => { context.API.OpenUrl(Constant.Documentation); @@ -409,9 +413,10 @@ private List Commands() Title = "Flow Launcher UserData Folder", SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location"), IcoPath = "Images\\app.png", + CopyText = userDataPath, Action = c => { - context.API.OpenDirectory(DataLocation.DataDirectory()); + context.API.OpenDirectory(userDataPath); return true; } }, From 29c9fd69ad857d4bc79ccd0765fdf9ea3df502dc Mon Sep 17 00:00:00 2001 From: cibere <71997063+cibere@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:45:32 -0800 Subject: [PATCH 2/3] add `AutoCompleteText` key to some results in the sys plugin --- Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs index a11a169deba..7d240e89a34 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs @@ -134,7 +134,8 @@ private List Commands() { var results = new List(); var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version); - var userDataPath = DataLocation.DataDirectory() + var userDataPath = DataLocation.DataDirectory(); + var recycleBinFolder = "shell:RecycleBinFolder"; results.AddRange(new[] { new Result @@ -296,11 +297,12 @@ private List Commands() SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_openrecyclebin"), IcoPath = "Images\\openrecyclebin.png", Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"), - CopyText = "shell:RecycleBinFolder", + CopyText = recycleBinFolder, + AutoCompleteText = recycleBinFolder, Action = c => { { - System.Diagnostics.Process.Start("explorer", "shell:RecycleBinFolder"); + System.Diagnostics.Process.Start("explorer", recycleBinFolder); } return true; @@ -390,6 +392,7 @@ private List Commands() SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_log_location"), IcoPath = "Images\\app.png", CopyText = logPath, + AutoCompleteText = logPath, Action = c => { context.API.OpenDirectory(logPath); @@ -402,6 +405,7 @@ private List Commands() 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); @@ -414,6 +418,7 @@ private List Commands() SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location"), IcoPath = "Images\\app.png", CopyText = userDataPath, + AutoCompleteText = userDataPath, Action = c => { context.API.OpenDirectory(userDataPath); From fe4fcf6cc0a75d94fe274d6c055fdf70ce336aeb Mon Sep 17 00:00:00 2001 From: cibere <71997063+cibere@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:53:25 -0800 Subject: [PATCH 3/3] remove `AutoCompleteText` from the Open Recycle Bin result in sys plugin --- Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs index 7d240e89a34..2d5847cded5 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs @@ -298,7 +298,6 @@ private List Commands() IcoPath = "Images\\openrecyclebin.png", Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"), CopyText = recycleBinFolder, - AutoCompleteText = recycleBinFolder, Action = c => { {