Run sleep script on button press in ES?
-
Is there a way to have EmulationStation detect a button press and then put the system in sleep mode? I have the system sleep option set and it eventually sleeps after 10 minutes, but there are some times when I know I'm done, so I wouldn't mind telling it to go to sleep right away.
-
Press
Select
(or the button that you mapped toSelect
) on your gamepad and it should go to sleep right away. You need to be in the system carousel for this to work. -
@mitu Thank you, I didn't realize that. One thing - although it is putting the display to sleep, it isn't calling my sleep script. I have that script turning my marquee off as well. Is there a way to have pressing select call a script?
-
@jduteau How is your sleep script called ? Did you use the scripting support in EmulationStation ?
-
@mitu Yes. I followed the docs and have a sleep script and a wake script that work wonderfully with the systemSleepTime setting. But pushing the select button is obviously not the same as the system sleeping after x minutes since it's not calling that script.
-
Pressing
select
is equivalent to thescreensaver-start
event,sleep
is triggered after the configured timeout.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.