Support runtime var expansion and set at runtime

This commit is contained in:
Brian Ashworth 2018-06-04 22:24:34 -04:00
parent 0f71547032
commit 067fe9d047
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