mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
config: pass a struct with inheritable values
For now, font and foreground color
This commit is contained in:
parent
7776135454
commit
8dc278aaf2
20 changed files with 84 additions and 48 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <poll.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "../module.h"
|
||||
|
||||
struct private {
|
||||
struct particle *label;
|
||||
|
@ -47,10 +48,10 @@ label_new(struct particle *label)
|
|||
}
|
||||
|
||||
static struct module *
|
||||
from_conf(const struct yml_node *node, const struct font *parent_font)
|
||||
from_conf(const struct yml_node *node, struct conf_inherit inherited)
|
||||
{
|
||||
const struct yml_node *c = yml_get_value(node, "content");
|
||||
return label_new(conf_to_particle(c, parent_font));
|
||||
return label_new(conf_to_particle(c, inherited));
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue