diff --git a/app/Extra.Designer.cs b/app/Extra.Designer.cs
index 76a6cdcb..a147d239 100644
--- a/app/Extra.Designer.cs
+++ b/app/Extra.Designer.cs
@@ -74,6 +74,7 @@ namespace GHelper
checkSleepLid = new CheckBox();
checkShutdownLid = new CheckBox();
groupOther = new GroupBox();
+ checkAutoApplyWindowsPowerMode = new CheckBox();
checkKeyboardAuto = new CheckBox();
checkUSBC = new CheckBox();
checkNoOverdrive = new CheckBox();
@@ -574,12 +575,13 @@ namespace GHelper
//
// groupOther
//
+ groupOther.Controls.Add(checkAutoApplyWindowsPowerMode);
groupOther.Controls.Add(checkKeyboardAuto);
groupOther.Controls.Add(checkUSBC);
groupOther.Controls.Add(checkNoOverdrive);
groupOther.Controls.Add(checkTopmost);
groupOther.Dock = DockStyle.Top;
- groupOther.Location = new Point(10, 768);
+ groupOther.Location = new Point(5, 358);
groupOther.Name = "groupOther";
groupOther.Size = new Size(954, 276);
groupOther.TabIndex = 2;
@@ -589,8 +591,8 @@ namespace GHelper
// checkKeyboardAuto
//
checkKeyboardAuto.AutoSize = true;
- checkKeyboardAuto.Location = new Point(25, 53);
checkKeyboardAuto.MaximumSize = new Size(780, 0);
+ checkKeyboardAuto.Location = new Point(25, 40);
checkKeyboardAuto.Name = "checkKeyboardAuto";
checkKeyboardAuto.Size = new Size(712, 36);
checkKeyboardAuto.TabIndex = 46;
@@ -600,7 +602,7 @@ namespace GHelper
// checkUSBC
//
checkUSBC.AutoSize = true;
- checkUSBC.Location = new Point(25, 210);
+ checkUSBC.Location = new Point(25, 85);
checkUSBC.Name = "checkUSBC";
checkUSBC.Size = new Size(659, 36);
checkUSBC.TabIndex = 4;
@@ -610,7 +612,7 @@ namespace GHelper
// checkNoOverdrive
//
checkNoOverdrive.AutoSize = true;
- checkNoOverdrive.Location = new Point(25, 156);
+ checkNoOverdrive.Location = new Point(25, 130);
checkNoOverdrive.Name = "checkNoOverdrive";
checkNoOverdrive.Size = new Size(307, 36);
checkNoOverdrive.TabIndex = 3;
@@ -620,13 +622,23 @@ namespace GHelper
// checkTopmost
//
checkTopmost.AutoSize = true;
- checkTopmost.Location = new Point(25, 104);
+ checkTopmost.Location = new Point(25, 175);
checkTopmost.Name = "checkTopmost";
checkTopmost.Size = new Size(390, 36);
checkTopmost.TabIndex = 1;
checkTopmost.Text = Strings.WindowTop;
checkTopmost.UseVisualStyleBackColor = true;
//
+ // checkAutoApplyWindowsPowerMode
+ //
+ checkAutoApplyWindowsPowerMode.AutoSize = true;
+ checkAutoApplyWindowsPowerMode.Location = new Point(25, 220);
+ checkAutoApplyWindowsPowerMode.Name = "checkAutoApplyWindowsPowerMode";
+ checkAutoApplyWindowsPowerMode.Size = new Size(211, 19);
+ checkAutoApplyWindowsPowerMode.TabIndex = 47;
+ checkAutoApplyWindowsPowerMode.Text = "Auto Adjust Windows Power Mode";
+ checkAutoApplyWindowsPowerMode.UseVisualStyleBackColor = true;
+ //
// Extra
//
AutoScaleDimensions = new SizeF(13F, 32F);
@@ -714,5 +726,6 @@ namespace GHelper
private Label labelBacklightTimeout;
private NumericUpDown numericBacklightTime;
private CheckBox checkKeyboardAuto;
+ private CheckBox checkAutoApplyWindowsPowerMode;
}
}
\ No newline at end of file
diff --git a/app/Extra.cs b/app/Extra.cs
index 9209c3a2..bdfb3e45 100644
--- a/app/Extra.cs
+++ b/app/Extra.cs
@@ -73,6 +73,7 @@ namespace GHelper
checkNoOverdrive.Text = Properties.Strings.DisableOverdrive;
checkTopmost.Text = Properties.Strings.WindowTop;
checkUSBC.Text = Properties.Strings.OptimizedUSBC;
+ checkAutoApplyWindowsPowerMode.Text = Properties.Strings.ApplyWindowsPowerPlan;
labelBacklight.Text = Properties.Strings.Keyboard;
labelBacklightBar.Text = Properties.Strings.Lightbar;
@@ -176,6 +177,9 @@ namespace GHelper
checkUSBC.Checked = (Program.config.getConfig("optimized_usbc") == 1);
checkUSBC.CheckedChanged += CheckUSBC_CheckedChanged;
+ checkAutoApplyWindowsPowerMode.Checked = Program.config.getConfig("auto_apply_power_plan") == 1;
+ checkAutoApplyWindowsPowerMode.CheckedChanged += checkAutoApplyWindowsPowerMode_CheckedChanged;
+
int kb_brightness = Program.config.getConfig("keyboard_brightness");
trackBrightness.Value = (kb_brightness >= 0 && kb_brightness <= 3) ? kb_brightness : 3;
@@ -299,5 +303,10 @@ namespace GHelper
Top = Program.settingsForm.Top;
Left = Program.settingsForm.Left - Width - 5;
}
+
+ private void checkAutoApplyWindowsPowerMode_CheckedChanged(object? sender, EventArgs e)
+ {
+ Program.config.setConfig("auto_apply_power_plan", checkAutoApplyWindowsPowerMode.Checked ? 1 : 0);
+ }
}
}
diff --git a/app/Properties/Strings.Designer.cs b/app/Properties/Strings.Designer.cs
index 1d7a5479..bd136139 100644
--- a/app/Properties/Strings.Designer.cs
+++ b/app/Properties/Strings.Designer.cs
@@ -169,7 +169,16 @@ namespace GHelper.Properties {
}
///
- /// Looks up a localized string similar to Breathe.
+ /// Looks up a localized string similar to Auto Adjust Windows Power Plan.
+ ///
+ internal static string ApplyWindowsPowerPlan {
+ get {
+ return ResourceManager.GetString("ApplyWindowsPowerPlan", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Breathe.
///
internal static string AuraBreathe {
get {
diff --git a/app/Properties/Strings.de.resx b/app/Properties/Strings.de.resx
index 32da890a..c8af7f77 100644
--- a/app/Properties/Strings.de.resx
+++ b/app/Properties/Strings.de.resx
@@ -94,6 +94,9 @@
Apply Power Limits
+
+ Auto Adjust Windows Power Mode
+
Breathe
diff --git a/app/Properties/Strings.es.resx b/app/Properties/Strings.es.resx
index 791c96dd..53eb4bb3 100644
--- a/app/Properties/Strings.es.resx
+++ b/app/Properties/Strings.es.resx
@@ -153,6 +153,9 @@
Aplicar límites de energía
+
+ Auto Adjust Windows Power Mode
+
Respiración
diff --git a/app/Properties/Strings.fr.resx b/app/Properties/Strings.fr.resx
index 32da890a..c8af7f77 100644
--- a/app/Properties/Strings.fr.resx
+++ b/app/Properties/Strings.fr.resx
@@ -94,6 +94,9 @@
Apply Power Limits
+
+ Auto Adjust Windows Power Mode
+
Breathe
diff --git a/app/Properties/Strings.it.resx b/app/Properties/Strings.it.resx
index 32da890a..c8af7f77 100644
--- a/app/Properties/Strings.it.resx
+++ b/app/Properties/Strings.it.resx
@@ -94,6 +94,9 @@
Apply Power Limits
+
+ Auto Adjust Windows Power Mode
+
Breathe
diff --git a/app/Properties/Strings.resx b/app/Properties/Strings.resx
index d255a48f..6d47593a 100644
--- a/app/Properties/Strings.resx
+++ b/app/Properties/Strings.resx
@@ -153,6 +153,9 @@
Apply Power Limits
+
+ Auto Adjust Windows Power Plan
+
Breathe
diff --git a/app/Properties/Strings.tr.resx b/app/Properties/Strings.tr.resx
index 37b7146e..8279459a 100644
--- a/app/Properties/Strings.tr.resx
+++ b/app/Properties/Strings.tr.resx
@@ -153,6 +153,9 @@
Güç Sınırlarını Uygula
+
+ Auto Adjust Windows Power Mode
+
Nefes
diff --git a/app/Properties/Strings.uk.resx b/app/Properties/Strings.uk.resx
index f2df1532..59a6b309 100644
--- a/app/Properties/Strings.uk.resx
+++ b/app/Properties/Strings.uk.resx
@@ -153,6 +153,9 @@
Застосувати потужність
+
+ Auto Adjust Windows Power Mode
+
Дихання
diff --git a/app/Properties/Strings.zh-CN.resx b/app/Properties/Strings.zh-CN.resx
index 65426d2d..a24b5678 100644
--- a/app/Properties/Strings.zh-CN.resx
+++ b/app/Properties/Strings.zh-CN.resx
@@ -153,6 +153,9 @@
应用功率限制
+
+ Auto Adjust Windows Power Mode
+
呼吸
diff --git a/app/Properties/Strings.zh-TW.resx b/app/Properties/Strings.zh-TW.resx
index 9b9b6bff..9941dae4 100644
--- a/app/Properties/Strings.zh-TW.resx
+++ b/app/Properties/Strings.zh-TW.resx
@@ -153,6 +153,9 @@
套用功率限制
+
+ Auto Adjust Windows Power Mode
+
呼吸
diff --git a/app/Settings.cs b/app/Settings.cs
index 5552f6ea..570c2b64 100644
--- a/app/Settings.cs
+++ b/app/Settings.cs
@@ -1286,11 +1286,13 @@ namespace GHelper
AutoFans();
AutoPower(1000);
-
- if (Program.config.getConfigPerfString("scheme") is not null)
- NativeMethods.SetPowerScheme(Program.config.getConfigPerfString("scheme"));
- else
- NativeMethods.SetPowerScheme(PerformanceMode);
+ if (Program.config.getConfig("auto_apply_power_plan") != 0)
+ {
+ if (Program.config.getConfigPerfString("scheme") is not null)
+ NativeMethods.SetPowerScheme(Program.config.getConfigPerfString("scheme"));
+ else
+ NativeMethods.SetPowerScheme(PerformanceMode);
+ }
if (Program.config.getConfigPerf("auto_boost") != -1)
{