aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/bar.c')
-rw-r--r--sway/commands/bar.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/commands/bar.c b/sway/commands/bar.c
index f760888e..03f4c557 100644
--- a/sway/commands/bar.c
+++ b/sway/commands/bar.c
@@ -46,14 +46,14 @@ struct cmd_results *cmd_bar(int argc, char **argv) {
return error;
}
- if (!config->reading) {
- if (!find_handler(argv[0], bar_config_handlers,
- sizeof(bar_config_handlers))) {
- return cmd_results_new(CMD_FAILURE, "bar",
- "Can only be used in config file.");
+ if (find_handler(argv[0], bar_config_handlers,
+ sizeof(bar_config_handlers))) {
+ if (config->reading) {
+ return config_subcommand(argv, argc, bar_config_handlers,
+ sizeof(bar_config_handlers));
}
- return config_subcommand(argv, argc, bar_config_handlers,
- sizeof(bar_config_handlers));
+ return cmd_results_new(CMD_FAILURE, "bar",
+ "Can only be used in config file.");
}
if (argc > 1) {