mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Added automatic toggle for "Lid Action" when external display and power is connected to keep the laptop awake when lid is closed (known as Clamshell Mode).
This commit is contained in:
11
app/Extra.cs
11
app/Extra.cs
@@ -106,6 +106,7 @@ namespace GHelper
|
||||
checkUSBC.Text = Properties.Strings.OptimizedUSBC;
|
||||
checkAutoApplyWindowsPowerMode.Text = Properties.Strings.ApplyWindowsPowerPlan;
|
||||
checkFnLock.Text = Properties.Strings.FnLock;
|
||||
checkAutoToggleClamshellMode.Text = Properties.Strings.ToggleClamshellMode;
|
||||
|
||||
labelBacklightKeyboard.Text = Properties.Strings.Keyboard;
|
||||
labelBacklightBar.Text = Properties.Strings.Lightbar;
|
||||
@@ -210,6 +211,9 @@ namespace GHelper
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
checkAutoToggleClamshellMode.Checked = AppConfig.Is("toggle_clamshell_mode");
|
||||
|
||||
checkTopmost.Checked = AppConfig.Is("topmost");
|
||||
checkTopmost.CheckedChanged += CheckTopmost_CheckedChanged; ;
|
||||
|
||||
@@ -466,5 +470,12 @@ namespace GHelper
|
||||
{
|
||||
AppConfig.Set("auto_apply_power_plan", checkAutoApplyWindowsPowerMode.Checked ? 1 : 0);
|
||||
}
|
||||
|
||||
private void checkAutoToggleClamshellMode_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
AppConfig.Set("toggle_clamshell_mode", checkAutoToggleClamshellMode.Checked ? 1 : 0);
|
||||
ClamshellModeControl ctrl = new ClamshellModeControl();
|
||||
ctrl.ToggleLidAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user