aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bar.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-05-22 12:42:27 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2019-05-22 22:33:10 +0300
commit00cffb8e20d4bb800134f26dcda8a01afa4467d2 (patch)
tree8960fa16cf97738606da7b996563e76d7f23e4f9 /sway/commands/bar.c
parentMake comment casing consistient (diff)
downloadsway-00cffb8e20d4bb800134f26dcda8a01afa4467d2.tar.gz
sway-00cffb8e20d4bb800134f26dcda8a01afa4467d2.tar.zst
sway-00cffb8e20d4bb800134f26dcda8a01afa4467d2.zip
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 (limited to 'sway/commands/bar.c')
-rw-r--r--sway/commands/bar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/commands/bar.c b/sway/commands/bar.c
index 88649bab..88580ffb 100644
--- a/sway/commands/bar.c
+++ b/sway/commands/bar.c
@@ -80,7 +80,8 @@ struct cmd_results *cmd_bar(int argc, char **argv) {
80 } 80 }
81 config->current_bar = bar; 81 config->current_bar = bar;
82 ++argv; --argc; 82 ++argv; --argc;
83 } else if (!config->reading) { 83 } else if (!config->reading && strcmp(argv[0], "mode") != 0 &&
84 strcmp(argv[0], "hidden_state") != 0) {
84 if (is_subcommand(argv[0])) { 85 if (is_subcommand(argv[0])) {
85 return cmd_results_new(CMD_INVALID, "No bar defined."); 86 return cmd_results_new(CMD_INVALID, "No bar defined.");
86 } else { 87 } else {