Add open target for program shortcuts

Signed-off-by: Florian Grabmeier <flo.grabmeier@gmail.com>
This commit is contained in:
Florian Grabmeier 2024-01-25 22:48:44 +01:00
parent acebf04c4c
commit 83d59b1103
2 changed files with 14 additions and 1 deletions

View file

@ -73,6 +73,7 @@
<system:String x:Key="flowlauncher_plugin_program_run_as_administrator">Run As Administrator</system:String>
<system:String x:Key="flowlauncher_plugin_program_open_containing_folder">Open containing folder</system:String>
<system:String x:Key="flowlauncher_plugin_program_disable_program">Disable this program from displaying</system:String>
<system:String x:Key="flowlauncher_plugin_program_open_target_folder">Open target folder</system:String>
<system:String x:Key="flowlauncher_plugin_program_plugin_name">Program</system:String>
<system:String x:Key="flowlauncher_plugin_program_plugin_description">Search programs in Flow Launcher</system:String>

View file

@ -261,7 +261,19 @@ namespace Flow.Launcher.Plugin.Program.Programs
},
IcoPath = "Images/folder.png",
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe838"),
}
},
new Result
{
Title = api.GetTranslation("flowlauncher_plugin_program_open_target_folder"),
Action = _ =>
{
Main.Context.API.OpenDirectory(Path.GetDirectoryName(ExecutablePath), ExecutablePath);
return true;
},
IcoPath = "Images/folder.png",
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe8de"),
},
};
return contextMenus;
}