From 1661edee2808f5d293ce89bf46bd87faff25d654 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 28 Nov 2015 10:18:37 -0500 Subject: Allow output config for output named * Which will match any output. --- sway/config.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sway/config.c') diff --git a/sway/config.c b/sway/config.c index 5f8e4d6a..e9785aba 100644 --- a/sway/config.c +++ b/sway/config.c @@ -289,6 +289,18 @@ void apply_output_config(struct output_config *oc, swayc_t *output) { output->x = x; } + if (!oc || !oc->background) { + // Look for a * config for background + int i; + for (i = 0; i < config->output_configs->length; ++i) { + oc = config->output_configs->items[i]; + if (strcasecmp("*", oc->name) == 0) { + break; + } + oc = NULL; + } + } + if (oc && oc->background) { int i; for (i = 0; i < root_container.children->length; ++i) { -- cgit v1.2.3