yori icon indicating copy to clipboard operation
yori copied to clipboard

Add "sleep" command?

Open stianhoiland opened this issue 1 year ago • 1 comments

Any chance you'd include a simple "sleep" command? It's one of those things that I have to use the mouse to do, and Microsoft's constant changing of the Start Menu keeps messing with my muscle memory.

I did a little research and NirCmd has a "standby" command. Dunno how it's implemented though.

But I also found this: https://superuser.com/a/1172869/1043094. Seems like a good implementation, as long as it's actually doing the equivalent of pressing the Sleep button in the Start Menu.

stianhoiland avatar Oct 24 '24 04:10 stianhoiland

I added “yshutdn –e” for sleep and “yshutdn –h” for hibernate, and added these to the Yui shutdown menu.

Unfortunately there’s a big caveat with sleep: connected standby devices don’t support it and if asked to do it, those devices hibernate instead. There must be a way to tell a device to implement connected standby (lock the session, turn off display, suspend win32) but I don’t see any API for it. From a user’s point of view, closing a laptop lid on a connected standby device is indistinguishable from sleep.

malxau avatar Oct 28 '24 04:10 malxau