sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 00cffb8e20d4bb800134f26dcda8a01afa4467d2
parent 08ec88692adbe8969a07f6b8ed30180b80a5c3d1
Author: Brian Ashworth <bosrsf04@gmail.com>
Date:   Wed, 22 May 2019 12:42:27 -0400

commands/bar: fix mode and hidden_state at runtime

For compatibility with i3, `bar mode` and `bar hidden_state` do not
require bar-ids (in the normal location) at runtime since they follow
the alternative syntax: `bar mode|hidden_state <option> [<bar-id>]`

This removes the incorrect error that the bar-id is missing for those
two bar subcommands

Diffstat:
Msway/commands/bar.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sway/commands/bar.c b/sway/commands/bar.c @@ -80,7 +80,8 @@ struct cmd_results *cmd_bar(int argc, char **argv) { } config->current_bar = bar; ++argv; --argc; - } else if (!config->reading) { + } else if (!config->reading && strcmp(argv[0], "mode") != 0 && + strcmp(argv[0], "hidden_state") != 0) { if (is_subcommand(argv[0])) { return cmd_results_new(CMD_INVALID, "No bar defined."); } else {