mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-28 22:23:42 +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) {
|
||||
return cmd_results_new(CMD_INVALID, "output", "Missing background file.");
|
||||
}
|
||||
char *src = argv[i];
|
||||
if (++i >= argc) {
|
||||
if (i + 1 >= argc) {
|
||||
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) {
|
||||
return cmd_results_new(CMD_INVALID, "output", "Invalid syntax (%s)", src);
|
||||
}
|
||||
free(src);
|
||||
src = p.we_wordv[0];
|
||||
if (config->reading && *src != '/') {
|
||||
char *conf = strdup(config->current_config);
|
||||
|
|
Loading…
Reference in a new issue