Skip to content

Commit 3bd4ca4

Browse files
committed
Replace hiberate with PInvoke
1 parent a065179 commit 3bd4ca4

File tree

1 file changed

+1
-6
lines changed
  • Plugins/Flow.Launcher.Plugin.Sys

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,7 @@ private List<Result> Commands()
269269
IcoPath = "Images\\hibernate.png",
270270
Action= c =>
271271
{
272-
var info = ShellCommand.SetProcessStartInfo("shutdown", arguments:"/h");
273-
info.WindowStyle = ProcessWindowStyle.Hidden;
274-
info.UseShellExecute = true;
275-
276-
ShellCommand.Execute(info);
277-
272+
PInvoke.SetSuspendState(true, false, false);
278273
return true;
279274
}
280275
},

0 commit comments

Comments
 (0)