This commit is contained in:
Serge
2023-08-03 21:32:05 +02:00
2 changed files with 32 additions and 31 deletions

View File

@@ -147,11 +147,6 @@ namespace GHelper.Input
} }
static bool IsManualBrightness()
{
return AppConfig.ContainsModel("505") || AppConfig.ContainsModel("705");
}
public static bool NoMKeys() public static bool NoMKeys()
{ {
return AppConfig.ContainsModel("Z13") || return AppConfig.ContainsModel("Z13") ||
@@ -162,18 +157,23 @@ namespace GHelper.Input
AppConfig.ContainsModel("FX505"); AppConfig.ContainsModel("FX505");
} }
static void BrightnessUp() static bool SwappedBrightness()
{ {
if (IsManualBrightness()) Program.toast.RunToast(ScreenBrightness.Adjust(+10) + "%", ToastIcon.BrightnessUp); return (AppConfig.ContainsModel("FA506IH") || AppConfig.ContainsModel("FX506LU"));
if (AppConfig.ContainsModel("FX506LU")) HandleOptimizationEvent(16);
else HandleOptimizationEvent(32);
} }
static void BrightnessDown() static void SetBrightness(int delta)
{ {
if (IsManualBrightness()) Program.toast.RunToast(ScreenBrightness.Adjust(-10) + "%", ToastIcon.BrightnessDown); var brightness = ScreenBrightness.Get();
if (AppConfig.ContainsModel("FX506LU")) HandleOptimizationEvent(32);
if (delta > 0 || SwappedBrightness()) HandleOptimizationEvent(32);
else HandleOptimizationEvent(16); else HandleOptimizationEvent(16);
if (!AppConfig.ContainsModel("TUF")) return;
Thread.Sleep(100);
if (brightness == ScreenBrightness.Get())
Program.toast.RunToast(ScreenBrightness.Adjust(delta) + "%", (delta < 0 ) ? ToastIcon.BrightnessDown : ToastIcon.BrightnessUp);
} }
public void KeyPressed(object sender, KeyPressedEventArgs e) public void KeyPressed(object sender, KeyPressedEventArgs e)
@@ -247,10 +247,10 @@ namespace GHelper.Input
KeyboardHook.KeyPress(Keys.Snapshot); KeyboardHook.KeyPress(Keys.Snapshot);
break; break;
case Keys.F7: case Keys.F7:
BrightnessDown(); SetBrightness(-10);
break; break;
case Keys.F8: case Keys.F8:
BrightnessUp(); SetBrightness(+10);
break; break;
case Keys.F9: case Keys.F9:
KeyboardHook.KeyWinPress(Keys.P); KeyboardHook.KeyWinPress(Keys.P);
@@ -287,11 +287,11 @@ namespace GHelper.Input
{ {
case Keys.VolumeDown: case Keys.VolumeDown:
// Screen brightness down on CTRL+VolDown // Screen brightness down on CTRL+VolDown
BrightnessDown(); SetBrightness(-10);
break; break;
case Keys.VolumeUp: case Keys.VolumeUp:
// Screen brightness up on CTRL+VolUp // Screen brightness up on CTRL+VolUp
BrightnessUp(); SetBrightness(+10);
break; break;
} }
} }
@@ -371,10 +371,10 @@ namespace GHelper.Input
Program.toast.RunToast(muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone); Program.toast.RunToast(muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
break; break;
case "brightness_up": case "brightness_up":
BrightnessUp(); SetBrightness(+10);
break; break;
case "brightness_down": case "brightness_down":
BrightnessDown(); SetBrightness(-10);
break; break;
case "screenpad_up": case "screenpad_up":
SetScreenpad(10); SetScreenpad(10);

View File

@@ -20,10 +20,11 @@ Lightweight Armoury Crate alternative for Asus laptops. A small utility that all
# [:floppy_disk: Download G-Helper App](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) # [:floppy_disk: Download G-Helper 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! - Don't forget to read [:question: FAQ ](#question-faq)
- If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it!
#### 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) #### 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._
![Gihhub](https://github.com/seerge/g-helper/assets/5920850/4d98465a-63a5-4498-ae14-afb3e67e7e82) ![Gihhub](https://github.com/seerge/g-helper/assets/5920850/4d98465a-63a5-4498-ae14-afb3e67e7e82)
@@ -45,10 +46,10 @@ _If you post about the app - please include a link. Thanks._
![Screenshot 2023-04-13 190951](https://user-images.githubusercontent.com/5920850/231859391-c4963af4-491c-4523-95d4-0bdcfd7cfd6f.png) ![Screenshot 2023-04-13 190951](https://user-images.githubusercontent.com/5920850/231859391-c4963af4-491c-4523-95d4-0bdcfd7cfd6f.png)
### :gear: Automatic switching when on battery or plugged in ### :gear: Automatic switching when on battery or plugged in
- Performance modes (app remembers last mode used on battery or when plugged) - App remembers last Mode used on battery or when plugged
- Optimized GPU mode - disables dGPU on battery and enables when plugged - Optimized GPU mode - disables dGPU on battery and enables when plugged
- Auto Screen refresh rate (60hz on battery, 120+ hz when plugged) - Auto Screen refresh rate (60hz on battery, max hz when plugged)
- Keyboard backlight can be turned off on battery - Keyboard backlight timeout on battery or when plugged
To keep auto switching and hotkeys working the app needs to stay running in the tray. It doesn't consume any resources. To keep auto switching and hotkeys working the app needs to stay running in the tray. It doesn't consume any resources.
@@ -56,20 +57,20 @@ To keep auto switching and hotkeys working the app needs to stay running in the
Modes are **same** as in Armoury Crate as they are stored in bios including default fan curves Modes are **same** as in Armoury Crate as they are stored in bios including default fan curves
1. Silent (minimal or no fans, 70W PPT total, up to 45W PPT to CPU) + Best power efficiency setting in windows 1. **Silent** (minimal or no fans, 70W PPT total, up to 45W PPT to CPU) + Best power efficiency setting in windows
2. Balanced (balanced fans, 100W PPT total, up to 45W PPT to CPU) + Balanced setting in windows 2. **Balanced** (balanced fans, 100W PPT total, up to 45W PPT to CPU) + Balanced setting in windows
3. Turbo (intense fans, 125W PPT total, up to 80W PPT to CPU) + Best performance setting in windows 3. **Turbo** (intense fans, 125W PPT total, up to 80W PPT to CPU) + Best performance setting in windows
_PPTs are shown for G14 2022, for other models PPTs will be different as they are set in bios._ _PPTs are shown for G14 2022, for other models PPTs will be different as they are set in bios._
### :video_game: GPU Modes ### :video_game: GPU Modes
1. Eco mode : only low power integrated GPU enabled, iGPU drives built in display 1. **Eco** : only low power integrated GPU enabled, iGPU drives built in display
2. Standard mode (MS Hybrid) : iGPU and dGPU enabled, iGPU drives built in display 2. **Standard** (MS Hybrid) : iGPU and dGPU enabled, iGPU drives built in display
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model) 3. **Ultimate**: iGPU and dGPU enabled, but dGPU drives built in display (supported on 2022+ models)
4. Optimized: disables dGPU on battery (Eco) and enables when plugged (Standard) 4. **Optimized**: disables dGPU on battery (Eco) and enables when plugged (Standard)
![Screenshot 2023-05-07 182519](https://user-images.githubusercontent.com/5920850/236697890-26938ac4-8840-4fed-a7b1-9a7b839fb865.png) ![Screenshot 2023-08-03 193646](https://github.com/seerge/g-helper/assets/5920850/ac7debcf-163a-4529-b7fd-fb4d2f3bb1da)
## :question: FAQ ## :question: FAQ