add copy cmd to context menu

This commit is contained in:
Jeremy Wu 2021-03-09 21:04:28 +11:00
parent 17a04d65c1
commit 22617aef33
3 changed files with 11 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -11,4 +11,5 @@
<system:String x:Key="flowlauncher_plugin_cmd_cmd_has_been_executed_times">this command has been executed {0} times</system:String>
<system:String x:Key="flowlauncher_plugin_cmd_execute_through_shell">execute command through command shell</system:String>
<system:String x:Key="flowlauncher_plugin_cmd_run_as_administrator">Run As Administrator</system:String>
<system:String x:Key="flowlauncher_plugin_cmd_copy">Copy the command</system:String>
</ResourceDictionary>

View file

@ -343,6 +343,16 @@ namespace Flow.Launcher.Plugin.Shell
return true;
},
IcoPath = Image
},
new Result
{
Title = context.API.GetTranslation("flowlauncher_plugin_cmd_copy"),
Action = c =>
{
Clipboard.SetDataObject(selectedResult.Title);
return true;
},
IcoPath = "Images/copy.png"
}
};