diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2010-06-29 03:30:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2010-06-29 03:30:13 +0000 |
commit | 552c9cd83f7207759b41947f63ada828683b7892 (patch) | |
tree | 432a775eabec3af116d70a5d6bff2fa2d88cd470 /cmd-list-windows.c | |
parent | 76bbdeb586ad93cfb16bd12db865b4c672a9168e (diff) | |
download | rtmux-552c9cd83f7207759b41947f63ada828683b7892.tar.gz rtmux-552c9cd83f7207759b41947f63ada828683b7892.tar.bz2 rtmux-552c9cd83f7207759b41947f63ada828683b7892.zip |
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.
Diffstat (limited to 'cmd-list-windows.c')
-rw-r--r-- | cmd-list-windows.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd-list-windows.c b/cmd-list-windows.c index 7e78c94e..cc12b0f4 100644 --- a/cmd-list-windows.c +++ b/cmd-list-windows.c @@ -45,6 +45,7 @@ cmd_list_windows_exec(struct cmd *self, struct cmd_ctx *ctx) struct cmd_target_data *data = self->data; struct session *s; struct winlink *wl; + char *layout; if ((s = cmd_find_session(ctx, data->target)) == NULL) return (-1); @@ -52,6 +53,9 @@ cmd_list_windows_exec(struct cmd *self, struct cmd_ctx *ctx) RB_FOREACH(wl, winlinks, &s->windows) { ctx->print(ctx, "%d: %s [%ux%u]", wl->idx, wl->window->name, wl->window->sx, wl->window->sy); + layout = layout_dump(wl->window); + ctx->print(ctx, " layout: %s", layout); + xfree(layout); } return (0); |