mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-17 09:01:34 +02:00
Custom layouts. list-windows command displays the layout as a string (such as
"bb62,159x48,0,0{79x48,0,0,79x48,80,0}") and it can be applied to another window (with the same number of panes or fewer) using select-layout.
This commit is contained in:
@ -79,13 +79,16 @@ cmd_select_layout_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
layout = wl->window->lastlayout;
|
||||
if (layout == -1)
|
||||
return (0);
|
||||
} else if ((layout = layout_set_lookup(data->arg)) == -1) {
|
||||
ctx->error(ctx, "unknown layout or ambiguous: %s", data->arg);
|
||||
return (-1);
|
||||
} else if ((layout = layout_set_lookup(data->arg)) != -1) {
|
||||
layout = layout_set_select(wl->window, layout);
|
||||
ctx->info(ctx, "arranging in: %s", layout_set_name(layout));
|
||||
} else {
|
||||
if (layout_parse(wl->window, data->arg) == -1) {
|
||||
ctx->error(ctx, "can't set layout: %s", data->arg);
|
||||
return (-1);
|
||||
}
|
||||
ctx->info(ctx, "arranging in: %s", data->arg);
|
||||
}
|
||||
|
||||
layout = layout_set_select(wl->window, layout);
|
||||
ctx->info(ctx, "arranging in: %s", layout_set_name(layout));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user