diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-05 21:21:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 21:21:47 +0100 |
commit | 25bea8f6a538edf47ab7e0625f24cdf31e28473f (patch) | |
tree | 96296f5d755a728e8999b072bfd5ce8ee9c4d79e /sway/commands/gaps.c | |
parent | 0e85b92250f8f6f01134a2d53f735567896f2ec8 (diff) | |
parent | fbf1730557687964ca520e70d94ab4b0fd63a595 (diff) | |
download | sway-25bea8f6a538edf47ab7e0625f24cdf31e28473f.tar.xz |
Merge branch 'master' into effective-damage
Diffstat (limited to 'sway/commands/gaps.c')
-rw-r--r-- | sway/commands/gaps.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sway/commands/gaps.c b/sway/commands/gaps.c index ca8cb27a..3f0ef155 100644 --- a/sway/commands/gaps.c +++ b/sway/commands/gaps.c @@ -149,16 +149,17 @@ struct cmd_results *cmd_gaps(int argc, char **argv) { return error; } + bool config_loading = !config->active || config->reloading; + if (argc == 2) { return gaps_set_defaults(argc, argv); } - if (argc == 4) { - if (config->active) { - return gaps_set_runtime(argc, argv); - } else { - return cmd_results_new(CMD_INVALID, "gaps", - "This syntax can only be used when sway is running"); - } + if (argc == 4 && !config_loading) { + return gaps_set_runtime(argc, argv); + } + if (config_loading) { + return cmd_results_new(CMD_INVALID, "gaps", + "Expected 'gaps inner|outer <px>'"); } return cmd_results_new(CMD_INVALID, "gaps", "Expected 'gaps inner|outer <px>' or " |