diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-26 00:03:44 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-26 00:03:44 +1000 |
commit | 885963f11fa031d9cb78d4a28788f8ee0a7769ec (patch) | |
tree | 6ee9577b8af7b68d85984e8f7ea03d8bf818d3d7 /sway/commands/gaps.c | |
parent | Merge pull request #2950 from emersion/presentation-time (diff) | |
download | sway-885963f11fa031d9cb78d4a28788f8ee0a7769ec.tar.gz sway-885963f11fa031d9cb78d4a28788f8ee0a7769ec.tar.zst sway-885963f11fa031d9cb78d4a28788f8ee0a7769ec.zip |
Deny several commands when there's no outputs connected
Diffstat (limited to 'sway/commands/gaps.c')
-rw-r--r-- | sway/commands/gaps.c | 4 |
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) { | |||
88 | if (error) { | 88 | if (error) { |
89 | return error; | 89 | return error; |
90 | } | 90 | } |
91 | if (!root->outputs->length) { | ||
92 | return cmd_results_new(CMD_INVALID, "gaps", | ||
93 | "Can't run this command while there's no outputs connected."); | ||
94 | } | ||
91 | 95 | ||
92 | struct gaps_data data; | 96 | struct gaps_data data; |
93 | 97 | ||