Merge pull request #2084 from RedSoxFan/runtime-var-expansion

Runtime variable expansion
This commit is contained in:
emersion 2018-06-07 19:29:26 +01:00 committed by GitHub
commit 07bee8cffe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View file

@ -128,12 +128,14 @@ char *workspace_next_name(const char *output_name) {
}
if (strcmp("workspace", cmd) == 0 && name) {
wlr_log(L_DEBUG, "Got valid workspace command for target: '%s'", name);
char *_target = strdup(name);
_target = do_var_replacement(_target);
strip_quotes(_target);
while (isspace(*_target)) {
memmove(_target, _target+1, strlen(_target+1));
}
wlr_log(L_DEBUG, "Got valid workspace command for target: '%s'",
_target);
// Make sure that the command references an actual workspace
// not a command about workspaces