diff --git a/sway/commands.c b/sway/commands.c index fe1e98b53..0cc16f775 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -403,6 +403,8 @@ struct cmd_results *config_command(char *exec, char **new_block) { && handler->handle != cmd_bindswitch && handler->handle != cmd_set && handler->handle != cmd_for_window + && handler->handle != cmd_output + && handler->handle != cmd_input && (*argv[i] == '\"' || *argv[i] == '\'')) { strip_quotes(argv[i]); } diff --git a/sway/commands/input.c b/sway/commands/input.c index c9bb8e06a..f0414bc66 100644 --- a/sway/commands/input.c +++ b/sway/commands/input.c @@ -51,6 +51,13 @@ struct cmd_results *cmd_input(int argc, char **argv) { return error; } + // Commands from config_command() & execute_command() don't handle quotes the same way + for (int i = 0; i < argc; ++i) { + if (*argv[i] == '\"' || *argv[i] == '\'') { + strip_quotes(argv[i]); + } + } + sway_log(SWAY_DEBUG, "entering input block: %s", argv[0]); config->handler_context.input_config = new_input_config(argv[0]); diff --git a/sway/commands/output.c b/sway/commands/output.c index 5186a2ba1..d28387a0c 100644 --- a/sway/commands/output.c +++ b/sway/commands/output.c @@ -2,6 +2,7 @@ #include "sway/commands.h" #include "sway/config.h" #include "sway/output.h" +#include "stringop.h" #include "list.h" #include "log.h" @@ -39,6 +40,13 @@ struct cmd_results *cmd_output(int argc, char **argv) { "Refusing to configure the no op output"); } + // Commands from config_command() & execute_command() don't handle quotes the same way + for (int i = 0; i < argc; ++i) { + if (*argv[i] == '\"' || *argv[i] == '\'') { + strip_quotes(argv[i]); + } + } + struct output_config *output = NULL; if (strcmp(argv[0], "-") == 0 || strcmp(argv[0], "--") == 0) { if (config->reading) {