Skip to content

Commit a01e0d4

Browse files
committed
add tips and userdata location commands for Sys plugin
1 parent 41c3f8a commit a01e0d4

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<system:String x:Key="flowlauncher_plugin_sys_reload_plugin_data">Refreshes plugin data with new content</system:String>
2121
<system:String x:Key="flowlauncher_plugin_sys_open_log_location">Open Flow Launcher's log location</system:String>
2222
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Check for new Flow Launcher update</system:String>
23+
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Visit Flow Launcher's documentation for more help and how to use tips</system:String>
24+
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Open the location where Flow Launcher's settings are stored</system:String>
2325

2426
<!--Dialogs-->
2527
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Success</system:String>

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

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,33 @@ private List<Result> Commands()
278278
Action = c =>
279279
{
280280
var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version);
281-
Process.Start("explorer".SetProcessStartInfo(arguments: logPath));
281+
FilesFolders.OpenPath(logPath);
282+
return true;
283+
}
284+
},
285+
new Result
286+
{
287+
Title = "Flow Launcher Tips",
288+
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_docs_tips"),
289+
IcoPath = "Images\\app.png",
290+
Action = c =>
291+
{
292+
SearchWeb.NewTabInBrowser(Constant.Documentation);
293+
return true;
294+
}
295+
},
296+
new Result
297+
{
298+
Title = "Flow Launcher UserData Folder",
299+
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location"),
300+
IcoPath = "Images\\app.png",
301+
Action = c =>
302+
{
303+
FilesFolders.OpenPath(DataLocation.DataDirectory());
282304
return true;
283305
}
284306
}
285-
});
307+
});
286308
return results;
287309
}
288310

0 commit comments

Comments
 (0)