Set custom power plan description
This commit is contained in:
parent
545cc20e48
commit
4c0afb498b
2 changed files with 6 additions and 1 deletions
|
|
@ -60,6 +60,7 @@ BLEACH_BIT_CLEANERS = (
|
||||||
'windows_explorer.thumbnails',
|
'windows_explorer.thumbnails',
|
||||||
)
|
)
|
||||||
CUSTOM_POWER_PLAN_NAME = f'{KIT_NAME_FULL} Power Plan'
|
CUSTOM_POWER_PLAN_NAME = f'{KIT_NAME_FULL} Power Plan'
|
||||||
|
CUSTOM_POWER_PLAN_DESC = 'Customized for the best experience.'
|
||||||
POWER_PLANS = {
|
POWER_PLANS = {
|
||||||
'Balanced': '381b4222-f694-41f0-9685-ff5bb260df2e',
|
'Balanced': '381b4222-f694-41f0-9685-ff5bb260df2e',
|
||||||
'Custom': '01189998-8199-9119-725c-ccccccccccc3',
|
'Custom': '01189998-8199-9119-725c-ccccccccccc3',
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ from wk.cfg.repairs import (
|
||||||
AUTO_REPAIR_DELAY_IN_SECONDS,
|
AUTO_REPAIR_DELAY_IN_SECONDS,
|
||||||
AUTO_REPAIR_KEY,
|
AUTO_REPAIR_KEY,
|
||||||
BLEACH_BIT_CLEANERS,
|
BLEACH_BIT_CLEANERS,
|
||||||
|
CUSTOM_POWER_PLAN_DESC,
|
||||||
CUSTOM_POWER_PLAN_NAME,
|
CUSTOM_POWER_PLAN_NAME,
|
||||||
POWER_PLANS,
|
POWER_PLANS,
|
||||||
POWER_PLAN_SLEEP_TIMEOUTS,
|
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)
|
LOG.error("Failed to create custom power plan.\n Details: %s", proc)
|
||||||
|
|
||||||
# Change the name
|
# 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)
|
run_program(cmd)
|
||||||
|
|
||||||
# Set as active plan
|
# Set as active plan
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue