Added states to enable sleep if user wants to

This commit is contained in:
Gregory Ballantine 2023-05-02 21:28:00 -06:00
parent 737f6009bb
commit 8536e32204

View File

@ -2,6 +2,7 @@
{% set settings = system_settings['sleep'] %} {% set settings = system_settings['sleep'] %}
{% if settings.disable %} {% if settings.disable %}
# Disable common sleep states
disable_sleep_target: disable_sleep_target:
service.masked: service.masked:
- name: 'sleep.target' - name: 'sleep.target'
@ -17,4 +18,21 @@ disable_hibernate_target:
disable_hybrid-sleep_target: disable_hybrid-sleep_target:
service.masked: service.masked:
- name: 'hybrid-sleep.target' - name: 'hybrid-sleep.target'
{% else %}
# Enable sleep states
enable_sleep_target:
service.unmasked:
- name: 'sleep.target'
enable_suspend_target:
service.unmasked:
- name: 'suspend.target'
enable_hibernate_target:
service.unmasked:
- name: 'hibernate.target'
enable_hybrid-sleep_target:
service.unmasked:
- name: 'hybrid-sleep.target'
{% endif %} {% endif %}