diff options
author | 2015-11-28 10:18:37 -0500 | |
---|---|---|
committer | 2015-11-28 10:18:37 -0500 | |
commit | 1661edee2808f5d293ce89bf46bd87faff25d654 (patch) | |
tree | 60d4b04a3a118f792f4faf1f7a88eb78acbcb72b /sway/config.c | |
parent | Improve config file loading (diff) | |
download | sway-1661edee2808f5d293ce89bf46bd87faff25d654.tar.gz sway-1661edee2808f5d293ce89bf46bd87faff25d654.tar.zst sway-1661edee2808f5d293ce89bf46bd87faff25d654.zip |
Allow output config for output named *
Which will match any output.
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 12 |
1 files changed, 12 insertions, 0 deletions
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) { | |||
289 | output->x = x; | 289 | output->x = x; |
290 | } | 290 | } |
291 | 291 | ||
292 | if (!oc || !oc->background) { | ||
293 | // Look for a * config for background | ||
294 | int i; | ||
295 | for (i = 0; i < config->output_configs->length; ++i) { | ||
296 | oc = config->output_configs->items[i]; | ||
297 | if (strcasecmp("*", oc->name) == 0) { | ||
298 | break; | ||
299 | } | ||
300 | oc = NULL; | ||
301 | } | ||
302 | } | ||
303 | |||
292 | if (oc && oc->background) { | 304 | if (oc && oc->background) { |
293 | int i; | 305 | int i; |
294 | for (i = 0; i < root_container.children->length; ++i) { | 306 | for (i = 0; i < root_container.children->length; ++i) { |