[Kde-hardware-devel] Knowing laptop lid closed action

Alex Fiestas afiestas at kde.org
Sat Feb 9 16:06:10 UTC 2013


I have the following use case, tell me what you think:

When the user closes the Lid, Kscreen will check if the laptop is connected to 
any monitor, if it is the laptop screen will be turned off and the external 
will be enabled.

This behavior is ok when your laptop does not suspend on lid close, but it is 
very annoying if the laptop suspend because you will see some changes in your 
screens that are not pleasant for the eye.

If I could know when "lid closed does nothing" I could hook this into Kscreen 
, making the following workflow:

On lid closed:
	-If the lid close action is set to do nothing, adapt Kscreen configuration
	-If lid closed does something else, do not modify the Kscreenconfiguration 

If you agree that this will be good to have, next question is: What's the best 
way of knowing what laptop lid close will do?

To work from at least 4.9 I thought on:
	-Read values from: powermanagementprofilesrc
	-Monitor that file from changes
	-connect to: org.kde.Solid.PowerManagement.profileChanged

For 4.11 maybe we could add something more sophisticated build in in 
PowerDevil?

Cheers. 


More information about the Kde-hardware-devel mailing list