config: layer: add 'overlay' and 'background'

The layer option (Wayland only) now accepts 'overlay' and
'background'.

Closes #372
This commit is contained in:
Daniel Eklöf 2024-04-06 15:39:19 +02:00
parent 28a18ad91e
commit d841aeeecd
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 34 additions and 7 deletions

View file

@ -340,10 +340,14 @@ conf_to_bar(const struct yml_node *bar, enum bar_backend backend)
const struct yml_node *layer = yml_get_value(bar, "layer");
if (layer != NULL) {
const char *tmp = yml_value_as_string(layer);
if (strcmp(tmp, "top") == 0)
if (strcmp(tmp, "overlay") == 0)
conf.layer = BAR_LAYER_OVERLAY;
else if (strcmp(tmp, "top") == 0)
conf.layer = BAR_LAYER_TOP;
else if (strcmp(tmp, "bottom") == 0)
conf.layer = BAR_LAYER_BOTTOM;
else if (strcmp(tmp, "background") == 0)
conf.layer = BAR_LAYER_BACKGROUND;
else
assert(false);
}