diff --git a/defaults/main.yml b/defaults/main.yml index b52245e..f1479e5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,3 +9,5 @@ win_obs_init__packages: - mpvio - vlc - obs-studio +win_obs_init__powerplan_enabled: false +win_obs_init_powerplan_mode: 'high performance' diff --git a/files/disable-screensaver.ps1 b/files/disable-screensaver.ps1 new file mode 100644 index 0000000..14426b4 --- /dev/null +++ b/files/disable-screensaver.ps1 @@ -0,0 +1,4 @@ +Write-Host "Disabling Screensaver" +Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord +& powercfg -x -monitor-timeout-ac 0 +& powercfg -x -monitor-timeout-dc 0 diff --git a/tasks/main.yml b/tasks/main.yml index f27ba9d..3c58928 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,3 +11,4 @@ - name: change the power plan to high performance ansible.builtin.include_tasks: powerplan.yml + when: win_obs_init__powerplan_enabled | bool diff --git a/tasks/powerplan.yml b/tasks/powerplan.yml index c8a67a3..2008235 100644 --- a/tasks/powerplan.yml +++ b/tasks/powerplan.yml @@ -1,4 +1,4 @@ --- - name: change the power plan to high performance community.windows.win_power_plan: - guid: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c + name: "{{ win_obs_init_powerplan_mode }}"