sway/sway/commands/exec.c

17 lines
458 B
C
Raw Normal View History

2017-12-04 21:43:49 +00:00
#include <string.h>
#include "sway/commands.h"
2017-12-05 09:40:55 +00:00
#include "sway/config.h"
2017-12-04 21:43:49 +00:00
#include "log.h"
#include "stringop.h"
struct cmd_results *cmd_exec(int argc, char **argv) {
if (!config->active) return cmd_results_new(CMD_DEFER, NULL);
2017-12-04 21:43:49 +00:00
if (config->reloading) {
char *args = join_args(argv, argc);
2018-07-09 21:54:30 +00:00
wlr_log(WLR_DEBUG, "Ignoring 'exec %s' due to reload", args);
2017-12-04 21:43:49 +00:00
free(args);
return cmd_results_new(CMD_SUCCESS, NULL);
2017-12-05 09:40:55 +00:00
}
2017-12-04 21:43:49 +00:00
return cmd_exec_always(argc, argv);
}