mirror of
https://github.com/swaywm/sway.git
synced 2025-11-21 06:59:48 -05:00
Refactor cmd_output to use config_subcommand
This commit is contained in:
parent
ebe0b668c9
commit
5ea4a4d3ee
12 changed files with 371 additions and 267 deletions
13
sway/commands/output/disable.c
Normal file
13
sway/commands/output/disable.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include "sway/commands.h"
|
||||
#include "sway/config.h"
|
||||
|
||||
struct cmd_results *output_cmd_disable(int argc, char **argv) {
|
||||
if (!config->handler_context.output_config) {
|
||||
return cmd_results_new(CMD_FAILURE, "output", "Missing output config");
|
||||
}
|
||||
config->handler_context.output_config->enabled = 0;
|
||||
|
||||
config->handler_context.leftovers.argc = argc;
|
||||
config->handler_context.leftovers.argv = argv;
|
||||
return NULL;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue