Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Plugins/Flow.Launcher.Plugin.Sys/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<system:String x:Key="flowlauncher_plugin_sys_shutdown_computer">Shutdown Computer</system:String>
<system:String x:Key="flowlauncher_plugin_sys_restart_computer">Restart Computer</system:String>
<system:String x:Key="flowlauncher_plugin_sys_restart_advanced">Restart the computer with Advanced Boot Options for Safe and Debugging modes, as well as other options</system:String>
<system:String x:Key="flowlauncher_plugin_sys_log_off">Log off</system:String>
<system:String x:Key="flowlauncher_plugin_sys_lock">Lock this computer</system:String>
<system:String x:Key="flowlauncher_plugin_sys_exit">Close Flow Launcher</system:String>
Expand All @@ -29,6 +30,7 @@
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_all_applicableplugins_reloaded">Reloaded all applicable plugin data</system:String>
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_shutdown_computer">Are you sure you want to shut the computer down?</system:String>
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_restart_computer">Are you sure you want to restart the computer?</system:String>
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_restart_computer_advanced">Are you sure you want to restart the computer with Advanced Boot Options?</system:String>

<system:String x:Key="flowlauncher_plugin_sys_plugin_name">System Commands</system:String>
<system:String x:Key="flowlauncher_plugin_sys_plugin_description">Provides System related commands. e.g. shutdown, lock, settings etc.</system:String>
Expand Down
18 changes: 18 additions & 0 deletions Plugins/Flow.Launcher.Plugin.Sys/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@ private List<Result> Commands()
}
},
new Result
{
Title = "Restart With Advanced Boot Options",
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_restart_advanced"),
IcoPath = "Images\\restart_advanced.png",
Action = c =>
{
var result = MessageBox.Show(
context.API.GetTranslation("flowlauncher_plugin_sys_dlgtext_restart_computer_advanced"),
context.API.GetTranslation("flowlauncher_plugin_sys_restart_computer"),
MessageBoxButton.YesNo, MessageBoxImage.Warning);

if (result == MessageBoxResult.Yes)
Process.Start("shutdown", "/r /o /t 0");

return true;
}
},
new Result
{
Title = "Log Off",
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_log_off"),
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Flow.Launcher.Plugin.Sys/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "System Commands",
"Description": "Provide System related commands. e.g. shutdown,lock, setting etc.",
"Author": "qianlifeng",
"Version": "1.3.2",
"Version": "1.4.0",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll",
Expand Down