mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2025-01-01 06:20:17 +01:00
Concatenate output cmd args, fixes #654
This commit is contained in:
parent
290a15ca1b
commit
16dc31f33b
1 changed files with 4 additions and 3 deletions
|
@ -1557,14 +1557,15 @@ static struct cmd_results *cmd_output(int argc, char **argv) {
|
||||||
if (++i >= argc) {
|
if (++i >= argc) {
|
||||||
return cmd_results_new(CMD_INVALID, "output", "Missing background file.");
|
return cmd_results_new(CMD_INVALID, "output", "Missing background file.");
|
||||||
}
|
}
|
||||||
char *src = argv[i];
|
if (i + 1 >= argc) {
|
||||||
if (++i >= argc) {
|
|
||||||
return cmd_results_new(CMD_INVALID, "output", "Missing background scaling mode.");
|
return cmd_results_new(CMD_INVALID, "output", "Missing background scaling mode.");
|
||||||
}
|
}
|
||||||
char *mode = argv[i];
|
char *src = join_args(argv + i, argc - i - 1);
|
||||||
|
char *mode = argv[argc - 1];
|
||||||
if (wordexp(src, &p, 0) != 0) {
|
if (wordexp(src, &p, 0) != 0) {
|
||||||
return cmd_results_new(CMD_INVALID, "output", "Invalid syntax (%s)", src);
|
return cmd_results_new(CMD_INVALID, "output", "Invalid syntax (%s)", src);
|
||||||
}
|
}
|
||||||
|
free(src);
|
||||||
src = p.we_wordv[0];
|
src = p.we_wordv[0];
|
||||||
if (config->reading && *src != '/') {
|
if (config->reading && *src != '/') {
|
||||||
char *conf = strdup(config->current_config);
|
char *conf = strdup(config->current_config);
|
||||||
|
|
Loading…
Reference in a new issue