mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
refactor commands.c
This commit is contained in:
parent
050704ab23
commit
b374c35758
77 changed files with 3567 additions and 3217 deletions
15
sway/commands/include.c
Normal file
15
sway/commands/include.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include "commands.h"
|
||||
#include "config.h"
|
||||
|
||||
struct cmd_results *cmd_include(int argc, char **argv) {
|
||||
struct cmd_results *error = NULL;
|
||||
if ((error = checkarg(argc, "include", EXPECTED_EQUAL_TO, 1))) {
|
||||
return error;
|
||||
}
|
||||
|
||||
if (!load_include_configs(argv[0], config)) {
|
||||
return cmd_results_new(CMD_INVALID, "include", "Failed to include sub configuration file: %s", argv[0]);
|
||||
}
|
||||
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue