swayfx/sway/commands/exit.c
William McKinnon f47f35c52c
rebase: Sway 1.11 (#431)
Co-authored-by: Erik Reider <35975961+ErikReider@users.noreply.github.com>
2025-06-24 00:00:27 -04:00

13 lines
335 B
C

#include <stddef.h>
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/server.h"
struct cmd_results *cmd_exit(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "exit", EXPECTED_EQUAL_TO, 0))) {
return error;
}
sway_terminate(0);
return cmd_results_new(CMD_SUCCESS, NULL);
}