bar: allow user to specify _which_ monitor to place the bar on

If not specified, the primary monitor will be used.
This commit is contained in:
Daniel Eklöf 2019-01-20 22:05:12 +01:00
parent ef04097bef
commit f26892d938
5 changed files with 35 additions and 5 deletions

View file

@ -194,6 +194,10 @@ conf_to_bar(const struct yml_node *bar)
* Optional attributes
*/
const struct yml_node *monitor = yml_get_value(bar, "monitor");
if (monitor != NULL)
conf.monitor = yml_value_as_string(monitor);
const struct yml_node *spacing = yml_get_value(bar, "spacing");
if (spacing != NULL)
conf.left_spacing = conf.right_spacing = yml_value_as_int(spacing);