diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-06-29 03:30:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-06-29 03:30:15 +0000 |
commit | 27d18160c9396db3e3b2cb67151fb869a9a704f3 (patch) | |
tree | 94dbad3c698eabf4a186a0ac507bc50b8a98e3b6 /usr.bin/tmux/cmd-list-windows.c | |
parent | 8e604a37f5b8e2b615a0262254283428820ec4c4 (diff) |
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 'usr.bin/tmux/cmd-list-windows.c')
-rw-r--r-- | usr.bin/tmux/cmd-list-windows.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-list-windows.c b/usr.bin/tmux/cmd-list-windows.c index e1b5e6c01a3..72f7d7b431d 100644 --- a/usr.bin/tmux/cmd-list-windows.c +++ b/usr.bin/tmux/cmd-list-windows.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-windows.c,v 1.8 2009/11/13 19:53:29 nicm Exp $ */ +/* $OpenBSD: cmd-list-windows.c,v 1.9 2010/06/29 03:30:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |