rework Sway validation
It's not perfect but it work
This commit is contained in:
parent
565c8c9d9d
commit
f283ca1b48
1 changed files with 9 additions and 1 deletions
|
@ -36,7 +36,15 @@
|
||||||
trim_blocks: true
|
trim_blocks: true
|
||||||
mode: 0640
|
mode: 0640
|
||||||
validate: >-
|
validate: >-
|
||||||
sh -c "if sway --config %s --validate 2>&1 | grep -q sway/config.c; then >&2 echo \"Error validating sway configuration\"; exit 1; else exit 0; fi"
|
sh -c "cat {{ansible_user_dir}}/.config/sway/conf.d/* %s > /tmp/sway; \
|
||||||
|
if sway --config /tmp/sway --validate 2>&1 \
|
||||||
|
| grep -q sway/config.c; \
|
||||||
|
then \
|
||||||
|
>&2 echo \"Error validating sway configuration\"; \
|
||||||
|
rm /tmp/sway; \
|
||||||
|
exit 1; \
|
||||||
|
else rm /tmp/sway; exit 0; \
|
||||||
|
fi"
|
||||||
loop:
|
loop:
|
||||||
- 00-variables
|
- 00-variables
|
||||||
- 10-input
|
- 10-input
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue