2017-12-05 08:43:49 +11:00
|
|
|
#include <string.h>
|
|
|
|
#include "sway/commands.h"
|
2017-12-05 20:40:55 +11:00
|
|
|
#include "sway/config.h"
|
2017-12-05 08:43:49 +11:00
|
|
|
#include "log.h"
|
|
|
|
#include "stringop.h"
|
|
|
|
|
|
|
|
struct cmd_results *cmd_exec(int argc, char **argv) {
|
2017-12-05 20:40:55 +11:00
|
|
|
if (!config->active) return cmd_results_new(CMD_DEFER, "exec", NULL);
|
2017-12-05 08:43:49 +11:00
|
|
|
if (config->reloading) {
|
|
|
|
char *args = join_args(argv, argc);
|
2018-01-06 08:32:51 +11:00
|
|
|
wlr_log(L_DEBUG, "Ignoring 'exec %s' due to reload", args);
|
2017-12-05 08:43:49 +11:00
|
|
|
free(args);
|
|
|
|
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
2017-12-05 20:40:55 +11:00
|
|
|
}
|
2017-12-05 08:43:49 +11:00
|
|
|
return cmd_exec_always(argc, argv);
|
|
|
|
}
|