pop-os / cosmic-epoch

Next generation Cosmic desktop environment
3.19k stars 86 forks source link

cosmic-comp or a new component to trigger on-idle behaviour (e.g. screenlock/screensaver) ? #172

Open jokeyrhyme opened 10 months ago

jokeyrhyme commented 10 months ago

Howdie, thanks so much sharing this project! <3 Exciting!

I can see that https://wayland.app/protocols/ext-idle-notify-v1 is intended to be supported in smithay ( https://github.com/Smithay/smithay/issues/781 ) and COSMIC ( https://github.com/pop-os/cosmic-epoch/issues/100#issuecomment-1533232505 )

Once cosmic-comp supports this protocol, one foreseeable goal could be to support (based on user's preference) having cosmic-greeter start after e.g. 5 minutes of lack of user activity, and perhaps DPMS off after another minute

This question is specifically about the glue between the idle notification and the on-idle behaviour

Actually, once cosmic-comp advertises the protocol support, it should even be possible to use swayidle itself in the interim, with a configuration that tells it to use cosmic-greeter and cosmic-randr as necessary

But in the long term, should COSMIC have it's own separate swayidle-like component? Or should this be entirely within cosmic-comp?

Drakulix commented 10 months ago

But in the long term, should COSMIC have it's own separate swayidle-like component? Or should this be entirely within cosmic-comp?

This hasn't been decided yet.

Given the compositor has all the necessary information (as well as the necessary permissions to trigger DPMS states) I could see this reside completely in cosmic-comp and configured via cosmic-settings. (Which would make the idle-notify a bit unnecessary for our use-cases, given the simplicity of the protocol I don't see a reason against supporting that additionally though.)

But I could also see another component like cosmic-settings-daemon to responsible for at least the lockscreen part. Though given DPMS requires involving cosmic-comp anyway, architecturally this doesn't make a great deal of sense in my personal opinion.

jokeyrhyme commented 2 months ago

Oooooo, https://github.com/pop-os/cosmic-idle

Drakulix commented 2 months ago

Note that only implements fade-to-black for now (and needs some more code in cosmic-comp/smithay).

If you want a proper screensaver now, you would probably replace cosmic-idle with a custom component.