mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e6f54e833 | ||
|
|
05aae069b4 | ||
|
|
28e949bee4 | ||
|
|
9a82a54b04 |
@@ -14,8 +14,18 @@ public static class AppConfig
|
|||||||
static AppConfig()
|
static AppConfig()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
string startupPath = Application.StartupPath.Trim('\\');
|
||||||
string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
|
string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
|
||||||
configFile = appPath + "\\config.json";
|
string configName = "\\config.json";
|
||||||
|
|
||||||
|
if (File.Exists(startupPath + configName))
|
||||||
|
{
|
||||||
|
configFile = startupPath + configName;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
configFile = appPath + configName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!System.IO.Directory.Exists(appPath))
|
if (!System.IO.Directory.Exists(appPath))
|
||||||
System.IO.Directory.CreateDirectory(appPath);
|
System.IO.Directory.CreateDirectory(appPath);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.84</AssemblyVersion>
|
<AssemblyVersion>0.86</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -804,9 +804,25 @@ public class NativeMethods
|
|||||||
|
|
||||||
public static void SetPowerScheme(string scheme)
|
public static void SetPowerScheme(string scheme)
|
||||||
{
|
{
|
||||||
PowerSetActiveScheme(IntPtr.Zero, new Guid(scheme));
|
List<string> overlays = new() {
|
||||||
PowerSetActiveOverlayScheme(new Guid(scheme));
|
"00000000-0000-0000-0000-000000000000",
|
||||||
Logger.WriteLine(scheme);
|
"ded574b5-45a0-4f42-8737-46345c09c238",
|
||||||
|
"961cc777-2547-4f9d-8174-7d86181b8a7a",
|
||||||
|
"3af9B8d9-7c97-431d-ad78-34a8bfea439f"
|
||||||
|
};
|
||||||
|
|
||||||
|
if (overlays.Contains(scheme))
|
||||||
|
{
|
||||||
|
PowerSetActiveOverlayScheme(new Guid(scheme));
|
||||||
|
Logger.WriteLine("Power mode:" + scheme);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PowerSetActiveScheme(IntPtr.Zero, new Guid(scheme));
|
||||||
|
Logger.WriteLine("Power plan:" + scheme);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetPowerScheme(int mode)
|
public static void SetPowerScheme(int mode)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Lightweight Armoury Crate alternative for Asus laptops. A small utility that all
|
|||||||
## [:floppy_disk: Download App](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
## [:floppy_disk: Download App](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||||
|
|
||||||
If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it!
|
If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it!
|
||||||
### [:euro: Donate EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [💵 Donate USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) | [:credit_card: Donate via Stripe](https://buy.stripe.com/00gaFJ9Lf79v7WobII)
|
#### Support project in [:euro: EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [💵 USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) | [:credit_card: Stripe](https://buy.stripe.com/00gaFJ9Lf79v7WobII)
|
||||||
|
|
||||||
_If you post about the app - please include a link. Thanks._
|
_If you post about the app - please include a link. Thanks._
|
||||||
|
|
||||||
@@ -222,6 +222,12 @@ Ctrl + Shift + F12
|
|||||||
|
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
**Libraries / projects used**
|
||||||
|
- [Linux Kernel](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/asus-wmi.c) for some basic endpoints in ASUS ACPI/WMI interface
|
||||||
|
- [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) for accessing Nvidia API
|
||||||
|
- [Starlight](https://github.com/vddCore/Starlight) for anime matrix communication protocol
|
||||||
|
- [UXTU](https://github.com/JamesCJ60/Universal-x86-Tuning-Utility) for undervolting using Ryzen System Management Unit
|
||||||
|
|
||||||
**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.
|
"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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user