First commit

This commit is contained in:
Yorick Barbanneau 2022-12-04 22:50:01 +01:00
commit ae4c3b85c0
5 changed files with 139 additions and 0 deletions

17
templates/config.j2 Normal file
View file

@ -0,0 +1,17 @@
# {{ ansible_managed }}
{% if swayidle_config is defined %}
{% if swayidle_config['timeouts'] is defined %}
{% for timeout in swayidle_config['timeouts'] %}
timeout {{ timeout['seconds'] }} '{{ timeout['command'] }}'
{%- if timeout['resume'] is defined %}
{{ ' resume' }} '{{ timeout['resume'] }}'
{% endif %}
{% endfor %}
{% endif %}
{% if swayidle_config['events'] is defined %}
{% for event, command in swayidle_config['events'].items() %}
{{ event }} '{{ command }}'
{% endfor %}
{% endif %}
{% endif %}