mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ddc93d275 | ||
|
|
fe6f3bc3bf | ||
|
|
9bf31c3235 | ||
|
|
0f333e90c3 | ||
|
|
33c4406f95 | ||
|
|
2abae6ac86 | ||
|
|
c795807c75 | ||
|
|
16bdb5d32a | ||
|
|
773c50579c | ||
|
|
59bfe845c6 | ||
|
|
95909bd951 | ||
|
|
ac89645476 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
7.0.x
|
8.0.x
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
dotnet build app/GHelper.sln
|
dotnet build app/GHelper.sln
|
||||||
|
|||||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -18,13 +18,13 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
7.0.x
|
8.0.x
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained
|
dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained
|
||||||
powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/GHelper.exe GHelper.zip
|
powershell Compress-Archive app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe GHelper.zip
|
||||||
- name: Upload
|
- name: Upload
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload ${{ github.ref_name }} app/bin/x64/Release/net7.0-windows/win-x64/publish/GHelper.exe GHelper.zip
|
gh release upload ${{ github.ref_name }} app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe GHelper.zip
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ public static class AppConfig
|
|||||||
|
|
||||||
public static bool IsOLED()
|
public static bool IsOLED()
|
||||||
{
|
{
|
||||||
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("UM340") || ContainsModel("S540");
|
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("UM340") || ContainsModel("S540") || ContainsModel("M7400");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsNoOverdrive()
|
public static bool IsNoOverdrive()
|
||||||
|
|||||||
13
app/Extra.Designer.cs
generated
13
app/Extra.Designer.cs
generated
@@ -791,30 +791,35 @@ namespace GHelper
|
|||||||
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||||
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||||
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||||
tableBacklight.Controls.Add(checkBatteryLogo, 0, 5);
|
|
||||||
tableBacklight.Controls.Add(checkBattery, 0, 5);
|
|
||||||
tableBacklight.Controls.Add(checkBatteryLid, 0, 5);
|
|
||||||
tableBacklight.Controls.Add(checkBatteryBar, 0, 5);
|
|
||||||
tableBacklight.Controls.Add(labelBacklightKeyboard, 0, 0);
|
tableBacklight.Controls.Add(labelBacklightKeyboard, 0, 0);
|
||||||
tableBacklight.Controls.Add(checkAwake, 0, 1);
|
tableBacklight.Controls.Add(checkAwake, 0, 1);
|
||||||
tableBacklight.Controls.Add(checkBoot, 0, 2);
|
tableBacklight.Controls.Add(checkBoot, 0, 2);
|
||||||
tableBacklight.Controls.Add(checkSleep, 0, 3);
|
tableBacklight.Controls.Add(checkSleep, 0, 3);
|
||||||
tableBacklight.Controls.Add(checkShutdown, 0, 4);
|
tableBacklight.Controls.Add(checkShutdown, 0, 4);
|
||||||
|
tableBacklight.Controls.Add(checkBattery, 0, 5);
|
||||||
|
|
||||||
tableBacklight.Controls.Add(labelBacklightLogo, 1, 0);
|
tableBacklight.Controls.Add(labelBacklightLogo, 1, 0);
|
||||||
tableBacklight.Controls.Add(checkAwakeLogo, 1, 1);
|
tableBacklight.Controls.Add(checkAwakeLogo, 1, 1);
|
||||||
tableBacklight.Controls.Add(checkBootLogo, 1, 2);
|
tableBacklight.Controls.Add(checkBootLogo, 1, 2);
|
||||||
tableBacklight.Controls.Add(checkSleepLogo, 1, 3);
|
tableBacklight.Controls.Add(checkSleepLogo, 1, 3);
|
||||||
tableBacklight.Controls.Add(checkShutdownLogo, 1, 4);
|
tableBacklight.Controls.Add(checkShutdownLogo, 1, 4);
|
||||||
|
tableBacklight.Controls.Add(checkBatteryLogo, 1, 5);
|
||||||
|
|
||||||
tableBacklight.Controls.Add(labelBacklightBar, 2, 0);
|
tableBacklight.Controls.Add(labelBacklightBar, 2, 0);
|
||||||
tableBacklight.Controls.Add(checkAwakeBar, 2, 1);
|
tableBacklight.Controls.Add(checkAwakeBar, 2, 1);
|
||||||
tableBacklight.Controls.Add(checkBootBar, 2, 2);
|
tableBacklight.Controls.Add(checkBootBar, 2, 2);
|
||||||
tableBacklight.Controls.Add(checkSleepBar, 2, 3);
|
tableBacklight.Controls.Add(checkSleepBar, 2, 3);
|
||||||
tableBacklight.Controls.Add(checkShutdownBar, 2, 4);
|
tableBacklight.Controls.Add(checkShutdownBar, 2, 4);
|
||||||
|
tableBacklight.Controls.Add(checkBatteryBar, 2, 5);
|
||||||
|
|
||||||
tableBacklight.Controls.Add(labelBacklightLid, 3, 0);
|
tableBacklight.Controls.Add(labelBacklightLid, 3, 0);
|
||||||
tableBacklight.Controls.Add(checkAwakeLid, 3, 1);
|
tableBacklight.Controls.Add(checkAwakeLid, 3, 1);
|
||||||
tableBacklight.Controls.Add(checkBootLid, 3, 2);
|
tableBacklight.Controls.Add(checkBootLid, 3, 2);
|
||||||
tableBacklight.Controls.Add(checkSleepLid, 3, 3);
|
tableBacklight.Controls.Add(checkSleepLid, 3, 3);
|
||||||
tableBacklight.Controls.Add(checkShutdownLid, 3, 4);
|
tableBacklight.Controls.Add(checkShutdownLid, 3, 4);
|
||||||
|
tableBacklight.Controls.Add(checkBatteryLid, 3, 5);
|
||||||
|
|
||||||
tableBacklight.Dock = DockStyle.Top;
|
tableBacklight.Dock = DockStyle.Top;
|
||||||
tableBacklight.Location = new Point(0, 5);
|
tableBacklight.Location = new Point(0, 5);
|
||||||
tableBacklight.Margin = new Padding(0);
|
tableBacklight.Margin = new Padding(0);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net7.0-windows</TargetFramework>
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWindowsForms>True</UseWindowsForms>
|
<UseWindowsForms>True</UseWindowsForms>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.177</AssemblyVersion>
|
<AssemblyVersion>0.179</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -130,5 +130,40 @@
|
|||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override int MaxDPI()
|
||||||
|
{
|
||||||
|
return 8_000;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int MinDPI()
|
||||||
|
{
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int DPIIncrements()
|
||||||
|
{
|
||||||
|
return 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasDPIColors()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override int ParseDPIProfile(byte[] packet)
|
||||||
|
{
|
||||||
|
return base.ParseDPIProfile(packet) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override byte[] GetChangeDPIProfilePacket(int profile)
|
||||||
|
{
|
||||||
|
return new byte[] { reportId, 0x51, 0x31, 0x0A, 0x00, 0x04 };
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override byte[] GetChangeDPIProfilePacket2(int profile)
|
||||||
|
{
|
||||||
|
return new byte[] { reportId, 0x51, 0x31, 0x09, 0x00, (byte)(profile - 1) };
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,10 +208,10 @@ namespace GHelper
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void SetAutoModes(bool powerChanged = false, bool init = false)
|
public static bool SetAutoModes(bool powerChanged = false, bool init = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 3000) return;
|
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 3000) return false;
|
||||||
lastAuto = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
lastAuto = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||||
|
|
||||||
isPlugged = SystemInformation.PowerStatus.PowerLineStatus;
|
isPlugged = SystemInformation.PowerStatus.PowerLineStatus;
|
||||||
@@ -240,6 +240,8 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
settingsForm.AutoKeyboard();
|
settingsForm.AutoKeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ namespace GHelper
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Logger.WriteLine("Monitor Power On");
|
Logger.WriteLine("Monitor Power On");
|
||||||
Program.SetAutoModes();
|
if (!Program.SetAutoModes()) BatteryControl.AutoBattery();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Logger.WriteLine("Monitor Dimmed");
|
Logger.WriteLine("Monitor Dimmed");
|
||||||
|
|||||||
@@ -1,5 +1,2 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
|
||||||
"version": "7.0.406"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ Small and lightweight Armoury Crate alternative for Asus laptops offering almost
|
|||||||
Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, Vivobook, Zenbook, ROG Ally and many more!
|
Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, Vivobook, Zenbook, ROG Ally and many more!
|
||||||
|
|
||||||
# [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
# [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||||
|
**⭐ If you like the app - please spread the word about it online**
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -103,6 +104,7 @@ Each BIOS mode is paired with matching Windows Power Mode. You can adjust this s
|
|||||||
- ROG Chakram X (P708)
|
- ROG Chakram X (P708)
|
||||||
- ROG Chakram Core (P511)
|
- ROG Chakram Core (P511)
|
||||||
- ROG Gladius II and Gladius II Origin (P502 and P504)
|
- ROG Gladius II and Gladius II Origin (P502 and P504)
|
||||||
|
- ROG Gladius II Wireless
|
||||||
- ROG Gladius III
|
- ROG Gladius III
|
||||||
- ROG Gladius III Wireless
|
- ROG Gladius III Wireless
|
||||||
- ROG Harpe Ace Aim Lab Edition
|
- ROG Harpe Ace Aim Lab Edition
|
||||||
@@ -116,6 +118,7 @@ Each BIOS mode is paired with matching Windows Power Mode. You can adjust this s
|
|||||||
- TUF Gaming M4 Wireless (P306)
|
- TUF Gaming M4 Wireless (P306)
|
||||||
- TUF Gaming M3
|
- TUF Gaming M3
|
||||||
- TUF Gaming M3 Gen II
|
- TUF Gaming M3 Gen II
|
||||||
|
- TUF Gaming M4 AIR
|
||||||
|
|
||||||
Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contribution and research (!).
|
Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contribution and research (!).
|
||||||
|
|
||||||
@@ -169,6 +172,6 @@ The role of G-Helper for your laptop is similar to the role of a remote control
|
|||||||
- [AsusCtl](https://gitlab.com/asus-linux/asusctl) for inspiration and some reverse engineering
|
- [AsusCtl](https://gitlab.com/asus-linux/asusctl) for inspiration and some reverse engineering
|
||||||
|
|
||||||
### Disclaimers
|
### Disclaimers
|
||||||
"ROG", "TUF", and "Armoury Crate" are trademarked by and belong to AsusTek Computer, Inc. I make no claims to these or any assets belonging to AsusTek Computer and use them purely for informational purposes only.
|
"Asus", "ROG", "TUF", and "Armoury Crate" are trademarked by and belong to AsusTek Computer, Inc. I make no claims to these or any assets belonging to AsusTek Computer and use them purely for informational purposes only.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED “AS IS” AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. MISUSE OF THIS SOFTWARE COULD CAUSE SYSTEM INSTABILITY OR MALFUNCTION.
|
THE SOFTWARE IS PROVIDED “AS IS” AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. MISUSE OF THIS SOFTWARE COULD CAUSE SYSTEM INSTABILITY OR MALFUNCTION.
|
||||||
|
|||||||
Reference in New Issue
Block a user