Skip to content

Commit 83d59b1

Browse files
committed
Add open target for program shortcuts
Signed-off-by: Florian Grabmeier <[email protected]>
1 parent acebf04 commit 83d59b1

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<system:String x:Key="flowlauncher_plugin_program_run_as_administrator">Run As Administrator</system:String>
7474
<system:String x:Key="flowlauncher_plugin_program_open_containing_folder">Open containing folder</system:String>
7575
<system:String x:Key="flowlauncher_plugin_program_disable_program">Disable this program from displaying</system:String>
76+
<system:String x:Key="flowlauncher_plugin_program_open_target_folder">Open target folder</system:String>
7677

7778
<system:String x:Key="flowlauncher_plugin_program_plugin_name">Program</system:String>
7879
<system:String x:Key="flowlauncher_plugin_program_plugin_description">Search programs in Flow Launcher</system:String>

Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,19 @@ public List<Result> ContextMenus(IPublicAPI api)
261261
},
262262
IcoPath = "Images/folder.png",
263263
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe838"),
264-
}
264+
},
265+
new Result
266+
{
267+
Title = api.GetTranslation("flowlauncher_plugin_program_open_target_folder"),
268+
Action = _ =>
269+
{
270+
Main.Context.API.OpenDirectory(Path.GetDirectoryName(ExecutablePath), ExecutablePath);
271+
272+
return true;
273+
},
274+
IcoPath = "Images/folder.png",
275+
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe8de"),
276+
},
265277
};
266278
return contextMenus;
267279
}

0 commit comments

Comments
 (0)