mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
module/river: rename the ‘per-output’ option to ‘all-monitors’
This also inverts its meaning.
This commit is contained in:
parent
621f0e18e6
commit
103c3102a9
3 changed files with 13 additions and 13 deletions
|
@ -49,7 +49,7 @@ struct private {
|
|||
struct zriver_status_manager_v1 *status_manager;
|
||||
struct particle *template;
|
||||
struct particle *title;
|
||||
bool per_output;
|
||||
bool all_monitors;
|
||||
|
||||
bool is_starting_up;
|
||||
tll(struct output) outputs;
|
||||
|
@ -90,7 +90,7 @@ content(struct module *mod)
|
|||
tll_foreach(m->outputs, it) {
|
||||
const struct output *output = &it->item;
|
||||
|
||||
if (m->per_output &&
|
||||
if (!m->all_monitors &&
|
||||
output_bar_is_on != NULL && output->name != NULL &&
|
||||
strcmp(output->name, output_bar_is_on) != 0)
|
||||
{
|
||||
|
@ -420,7 +420,7 @@ focused_view(void *data, struct zriver_seat_status_v1 *zriver_seat_status_v1,
|
|||
|
||||
const char *output_bar_is_on = mod->bar->output_name(mod->bar);
|
||||
|
||||
if (!seat->m->per_output ||
|
||||
if (seat->m->all_monitors ||
|
||||
(output_bar_is_on != NULL &&
|
||||
seat->output != NULL && seat->output->name != NULL &&
|
||||
strcmp(output_bar_is_on, seat->output->name) == 0))
|
||||
|
@ -696,12 +696,12 @@ out:
|
|||
}
|
||||
|
||||
static struct module *
|
||||
river_new(struct particle *template, struct particle *title, bool per_output)
|
||||
river_new(struct particle *template, struct particle *title, bool all_monitors)
|
||||
{
|
||||
struct private *m = calloc(1, sizeof(*m));
|
||||
m->template = template;
|
||||
m->title = title;
|
||||
m->per_output = per_output;
|
||||
m->all_monitors = all_monitors;
|
||||
m->is_starting_up = true;
|
||||
|
||||
struct module *mod = module_common_new();
|
||||
|
@ -719,12 +719,12 @@ from_conf(const struct yml_node *node, struct conf_inherit inherited)
|
|||
{
|
||||
const struct yml_node *c = yml_get_value(node, "content");
|
||||
const struct yml_node *title = yml_get_value(node, "title");
|
||||
const struct yml_node *per_output = yml_get_value(node, "per-output");
|
||||
const struct yml_node *all_monitors = yml_get_value(node, "all-monitors");
|
||||
|
||||
return river_new(
|
||||
conf_to_particle(c, inherited),
|
||||
title != NULL ? conf_to_particle(title, inherited) : NULL,
|
||||
per_output != NULL ? yml_value_as_bool(per_output) : false);
|
||||
all_monitors != NULL ? yml_value_as_bool(all_monitors) : false);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -732,7 +732,7 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
|
|||
{
|
||||
static const struct attr_info attrs[] = {
|
||||
{"title", false, &conf_verify_particle},
|
||||
{"per-output", false, &conf_verify_bool},
|
||||
{"all-monitors", false, &conf_verify_bool},
|
||||
MODULE_COMMON_ATTRS,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue