aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/gaps.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/gaps.c')
-rw-r--r--sway/commands/gaps.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/gaps.c b/sway/commands/gaps.c
index 042b415f..ca8cb27a 100644
--- a/sway/commands/gaps.c
+++ b/sway/commands/gaps.c
@@ -88,6 +88,10 @@ static struct cmd_results *gaps_set_runtime(int argc, char **argv) {
if (error) {
return error;
}
+ if (!root->outputs->length) {
+ return cmd_results_new(CMD_INVALID, "gaps",
+ "Can't run this command while there's no outputs connected.");
+ }
struct gaps_data data;