Early Access: Scripting and Display Off / Energy Saving Feature
jdrassa last edited by
@Lolonois I gave it a quick look. The actually script execution portion looks pretty similar to what I implemented. What I have is a bit more comprehensive. It covers more events of interest beyond wake/sleep. I'd prefer to get that merged first and then have you update your PR to work with it. I am going to try to make time this weekend and dust if off and get it ready.
where to fulfill the pre-req that the path are created during ES setup and
how to deploy a short readme in this folder during setup to explain when the scripts are called and that they have to have the executable flag set
I think both can be done through the ES scriptmodule installation, though I think there should be a sample
scriptsfolder, including a README.
EDIT: Why enable it just for the RPI ? I think we might find alternatives for Odroid, PC (Ubuntu, Debians).
@jdrassa quite impressive list of events,did not knew all of them. Thanks for sharing and documenting them in one place.
While your PR is pending I will adapt mine to be applicable on top of yours.
Why enable it just for the RPI ?
With the more generic scripting approach there is no need to do so, right.
Whenever a maker of a Arcade wants that there should be some action on event x then she/he had put a script into the respective folder deliberatly. Without any script there is no action on any platform/arch although the event was fired.
@jdrassa I am done with aligning my PR with yours. Changes include:
- renamed "DisplayOffTime" to "SystemSleepTime"
- Initially the SystemSleepTime is zero, thus off/no event fired. Once the user sets a value > 0 he/she gets a one time note to check the Retropie Wiki how to put events into user-action (i.e. providing a script in the appropriate folder).
- removed limitation to
Now, for the tricky part: How to get it into the mainline?
I see these options:
- Wait until jdrassa's PR #551 is accepted, then push-force mine #550 to reflect my additions on top of jdrassa's PR.
- @jdrassa you may provide me write access to PR #551 so I could integrate my additions
- Some other option I am not aware of.
@BuZz et al: What is the suggested way the retropie repo owner do prefer?
IMHO you should have a separate PR building off @jdrassa's additions and force-push on your existing PR.
Please see jdrassa's wiki page on the scripting support.
Additions to PR 551 from jdrassa include:
- added GUI to configure time when station enters "sleep" state when no user interaction
- only honor executable scripts/binaries for event system calls
- added extra events when screensaver starts and gets stopped (currently not yet documented in the wiki page above)
The events I focused on are:
screensaver-startfired on screensaver activation
screensaver-stopfired on screensaver deactivation
sleepfired when station is without user input for a specified time (see PR)
wakefired when station returns from sleep (i.e. user input)
For early access users:
git clone https://github.com/RetroPie/EmulationStation.git cd EmulationStation git fetch origin pull/550/head:event-scripting git checkout event-scripting cmake . && make ./emulationstation --debug
Please share your questions, suggestions, findings aso. here.
cyperghost last edited by cyperghost
screensaver-start fired on screensaver activation
screensaver-stop fired on screensaver deactivation
sleep fired when station is without user input for a specified time (see PR)
wake fired when station returns from sleep (i.e. user input)
The ScreenSaver Options are very usefull. Is it intended to work on all ScreenSavers (DIM, Black Screen, Video and Picture) if this works on all I think I'll write a small script for the video collections @Malixx ... they can be found here and then the videos files do not need to be linked to gameslists and can work as own module ;)
Is it intended to work on all ScreenSavers ?
Yes. No distinction between type of screensaver (video, slideshow, dim, blank). Currently the type is not passed as argument for a script.
Update: Please use PR 560 (note the 6) from now on for testing. Needed to reapply PR since fork and upstream diverted too much. So:
git clone https://github.com/RetroPie/EmulationStation.git cd EmulationStation git fetch origin pull/560/head:event-scripting git checkout event-scripting cmake . && make ./emulationstation --debug