mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 12:55:41 +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
|
@ -19,7 +19,7 @@
|
|||
(https://codeberg.org/dnkl/yambar/issues/77).
|
||||
* bar: `layer: top|bottom`, allowing the layer which the bar is
|
||||
rendered on to be changed. Wayland only - ignored on X11.
|
||||
* river: `per-output: false|true`.
|
||||
* river: `all-monitors: false|true`.
|
||||
* `-d,--log-level=info|warning|error|none` command line option
|
||||
(https://codeberg.org/dnkl/yambar/issues/84).
|
||||
* river: support for the river-status protocol, version 2 (‘urgent’
|
||||
|
|
|
@ -63,12 +63,12 @@ once for all 32 river tags. This means you probably want to use a
|
|||
: particle
|
||||
: yes
|
||||
: Template particle that will be instantiated once for all of the 32 river tags.
|
||||
| per-output
|
||||
| all-monitors
|
||||
: bool
|
||||
: no
|
||||
: When set to false (the default), tags reflect the union of all
|
||||
outputs. When set to true, tags reflect river tags and seats for
|
||||
the output yambar is on only.
|
||||
: When set to false (the default), tags reflect river tags and seats
|
||||
for the monitor yambar is on only. When set to true, tags reflect
|
||||
the union of all monitors.
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
|
|
|
@ -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
Reference in a new issue