aboutsummaryrefslogtreecommitdiff
path: root/cmd-list-windows.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-07-02 02:54:52 +0000
committerTiago Cunha <tcunha@gmx.com>2010-07-02 02:54:52 +0000
commite4703bacb54b873a49a060395870120449efaf18 (patch)
treedbb3e18c606e82c1bb78f4646a0426ec749223bf /cmd-list-windows.c
parente4573de97b40a7aaebcdcd2a4b699b5f995fe506 (diff)
downloadrtmux-e4703bacb54b873a49a060395870120449efaf18.tar.gz
rtmux-e4703bacb54b873a49a060395870120449efaf18.tar.bz2
rtmux-e4703bacb54b873a49a060395870120449efaf18.zip
Sync OpenBSD patchset 732:
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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd-list-windows.c b/cmd-list-windows.c
index be7a931e..1bd49bb9 100644
--- a/cmd-list-windows.c
+++ b/cmd-list-windows.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-list-windows.c,v 1.42 2009-11-14 17:56:39 tcunha Exp $ */
+/* $Id: cmd-list-windows.c,v 1.43 2010-07-02 02:54:52 tcunha 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);