mirror of
https://github.com/swaywm/sway.git
synced 2025-11-13 13:29:49 -05:00
Deny several commands when there's no outputs connected
This commit is contained in:
parent
ea2497d35c
commit
885963f11f
13 changed files with 52 additions and 0 deletions
|
|
@ -87,6 +87,10 @@ struct cmd_results *cmd_scratchpad(int argc, char **argv) {
|
|||
return cmd_results_new(CMD_INVALID, "scratchpad",
|
||||
"Expected 'scratchpad show'");
|
||||
}
|
||||
if (!root->outputs->length) {
|
||||
return cmd_results_new(CMD_INVALID, "scratchpad",
|
||||
"Can't run this command while there's no outputs connected.");
|
||||
}
|
||||
if (!root->scratchpad->length) {
|
||||
return cmd_results_new(CMD_INVALID, "scratchpad",
|
||||
"Scratchpad is empty");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue