fohrloop/wakepy

A mode for keeping system unlocked but allowing display to turn off

Opened this issue · 0 comments

An idea from this reddit comment. Could it be possible to implement a mode where:

  • Suspend is inhibited
  • Screenlock is inhibited
  • Display may turn automatically off, or is tried to be turned off automatically after a set period of time

Possible names for the mode could be: keep.open or keep.unlocked.

About possible implementation:

  • An easy way of implementing this would be to use the Methods from keep.presenting mode and then call some service to switch display off after a set amount of time, for example 60 seconds. One thing which could be beneficial for this would be the ability to somehow fallback to another mode if it's not possible to turn the display off.
  • A possible workaround could be to implement a function in wakepy which turns the display off, like turn_display_off. Then, add on_success parameter to keep.presenting(). But the naming does not go well there :). So maybe there could be keep.unlocked() function which internally uses keep.presenting() and passes down the function.
  • One thing that must be taken into account is how wakepy may check if some "turn display off" method may be used without actually calling it and making the screen blink once?
  • Would there be some "display off" mode with different methods implementing it? Or just a collection of functions that are called?