mirror of
https://github.com/swaywm/sway.git
synced 2026-03-20 05:34:28 -04:00
Add minimal config subsystem
This commit is contained in:
parent
83b4c0648d
commit
90f7f1a0e6
11 changed files with 1091 additions and 19 deletions
|
|
@ -1,19 +1,17 @@
|
|||
#include <stddef.h>
|
||||
#include "sway/commands.h"
|
||||
#include "sway/config.h"
|
||||
|
||||
void sway_terminate(int exit_code);
|
||||
|
||||
struct cmd_results *cmd_exit(int argc, char **argv) {
|
||||
struct cmd_results *error = NULL;
|
||||
/* TODO
|
||||
if (config->reading) {
|
||||
return cmd_results_new(CMD_FAILURE, "exit", "Can't be used in config file.");
|
||||
}
|
||||
*/
|
||||
if ((error = checkarg(argc, "exit", EXPECTED_EQUAL_TO, 0))) {
|
||||
return error;
|
||||
}
|
||||
sway_terminate(0);
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue