version 1.25, 2015/04/28 10:43:13 |
version 1.26, 2015/12/13 14:32:38 |
|
|
"select-layout", "selectl", |
"select-layout", "selectl", |
"nopt:", 0, 1, |
"nopt:", 0, 1, |
"[-nop] " CMD_TARGET_WINDOW_USAGE " [layout-name]", |
"[-nop] " CMD_TARGET_WINDOW_USAGE " [layout-name]", |
0, |
CMD_WINDOW_T, |
cmd_select_layout_exec |
cmd_select_layout_exec |
}; |
}; |
|
|
|
|
"next-layout", "nextl", |
"next-layout", "nextl", |
"t:", 0, 0, |
"t:", 0, 0, |
CMD_TARGET_WINDOW_USAGE, |
CMD_TARGET_WINDOW_USAGE, |
0, |
CMD_WINDOW_T, |
cmd_select_layout_exec |
cmd_select_layout_exec |
}; |
}; |
|
|
|
|
"previous-layout", "prevl", |
"previous-layout", "prevl", |
"t:", 0, 0, |
"t:", 0, 0, |
CMD_TARGET_WINDOW_USAGE, |
CMD_TARGET_WINDOW_USAGE, |
0, |
CMD_WINDOW_T, |
cmd_select_layout_exec |
cmd_select_layout_exec |
}; |
}; |
|
|
|
|
cmd_select_layout_exec(struct cmd *self, struct cmd_q *cmdq) |
cmd_select_layout_exec(struct cmd *self, struct cmd_q *cmdq) |
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
struct winlink *wl; |
struct winlink *wl = cmdq->state.tflag.wl; |
struct window *w; |
struct window *w; |
const char *layoutname; |
const char *layoutname; |
char *oldlayout; |
char *oldlayout; |
int next, previous, layout; |
int next, previous, layout; |
|
|
if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL) |
|
return (CMD_RETURN_ERROR); |
|
w = wl->window; |
w = wl->window; |
|
|
server_unzoom_window(w); |
server_unzoom_window(w); |
|
|
next = self->entry == &cmd_next_layout_entry; |
next = self->entry == &cmd_next_layout_entry; |