pop-os / cosmic-epoch

Next generation Cosmic desktop environment
1.73k stars 55 forks source link

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

Open jokeyrhyme opened 5 months ago

jokeyrhyme commented 5 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 5 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.