From 3c82bbce9aeb036f99631d1d5cb5d0b9f87b6068 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 19 Nov 2022 17:12:45 +0100 Subject: [PATCH] ignore outputs without options Or when status is not enabled --- templates/20-output.config.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/20-output.config.j2 b/templates/20-output.config.j2 index 321be65..6ac4db8 100644 --- a/templates/20-output.config.j2 +++ b/templates/20-output.config.j2 @@ -1,9 +1,11 @@ {% if sway_outputs %} + {% for output in sway_outputs %} -output {{ output.name ~ " " }} +{% if output.options is defined and ( output.status is not defined or output.status == 'enabled') %} {%- for option in output.options %} -{{ option.option }} {{ option.value }} +output {{ output.name ~ " " }} {{ option.option }} {{ option.value }} {% endfor %} +{% endif %} {% endfor %} {% endif %}