From 4c0afb498bbda2f752db67a8ea82caf2e4f438c6 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 27 Oct 2021 20:25:49 -0600 Subject: [PATCH] Set custom power plan description --- scripts/wk/cfg/repairs.py | 1 + scripts/wk/repairs/win.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/wk/cfg/repairs.py b/scripts/wk/cfg/repairs.py index 837186f3..d716d3b2 100644 --- a/scripts/wk/cfg/repairs.py +++ b/scripts/wk/cfg/repairs.py @@ -60,6 +60,7 @@ BLEACH_BIT_CLEANERS = ( 'windows_explorer.thumbnails', ) CUSTOM_POWER_PLAN_NAME = f'{KIT_NAME_FULL} Power Plan' +CUSTOM_POWER_PLAN_DESC = 'Customized for the best experience.' POWER_PLANS = { 'Balanced': '381b4222-f694-41f0-9685-ff5bb260df2e', 'Custom': '01189998-8199-9119-725c-ccccccccccc3', diff --git a/scripts/wk/repairs/win.py b/scripts/wk/repairs/win.py index ddad6ba8..11dda1e8 100644 --- a/scripts/wk/repairs/win.py +++ b/scripts/wk/repairs/win.py @@ -16,6 +16,7 @@ from wk.cfg.repairs import ( AUTO_REPAIR_DELAY_IN_SECONDS, AUTO_REPAIR_KEY, BLEACH_BIT_CLEANERS, + CUSTOM_POWER_PLAN_DESC, CUSTOM_POWER_PLAN_NAME, POWER_PLANS, POWER_PLAN_SLEEP_TIMEOUTS, @@ -1088,7 +1089,10 @@ def create_custom_power_plan(enable_sleep=True, keep_display_on=False): LOG.error("Failed to create custom power plan.\n Details: %s", proc) # Change the name - cmd = ['powercfg', '-ChangeName', custom_guid, CUSTOM_POWER_PLAN_NAME] + cmd = [ + 'powercfg', '-ChangeName', custom_guid, + CUSTOM_POWER_PLAN_NAME, CUSTOM_POWER_PLAN_DESC, + ] run_program(cmd) # Set as active plan