mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Support runtime var expansion and set at runtime
This commit is contained in:
parent
0f71547032
commit
067fe9d047
3 changed files with 19 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue