Set custom power plan description

This commit is contained in:
2Shirt 2021-10-27 20:25:49 -06:00
parent 545cc20e48
commit 4c0afb498b
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 6 additions and 1 deletions

View file

@ -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',

View file

@ -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