mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Users can set a config option clamshell_default_lid_action to set their desired option when clamshell is not engaged.
This commit is contained in:
@@ -62,7 +62,7 @@ namespace GHelper.Helpers
|
||||
}
|
||||
public static void DisableClamshellMode()
|
||||
{
|
||||
PowerNative.SetLidAction(1, true);
|
||||
PowerNative.SetLidAction(GetDefaultLidAction(), true);
|
||||
Logger.WriteLine("Disengaging Clamshell Mode");
|
||||
}
|
||||
|
||||
@@ -89,5 +89,15 @@ namespace GHelper.Helpers
|
||||
if (IsClamshellEnabled())
|
||||
ToggleLidAction();
|
||||
}
|
||||
|
||||
//Power users can change that setting.
|
||||
//0 = Do nothing
|
||||
//1 = Sleep (default)
|
||||
//2 = Hibernate
|
||||
//3 = Shutdown
|
||||
private static int GetDefaultLidAction()
|
||||
{
|
||||
return AppConfig.Get("clamshell_default_lid_action", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user