From 45dfc5a074e2ceae11a6d4aeae597bee1e028503 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 20 Oct 2014 22:29:25 +0000 Subject: Instead of setting up the default keys by building the key struct directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon. --- cmd-list-windows.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd-list-windows.c') diff --git a/cmd-list-windows.c b/cmd-list-windows.c index bc56816f..1317ecb1 100644 --- a/cmd-list-windows.c +++ b/cmd-list-windows.c @@ -38,7 +38,6 @@ const struct cmd_entry cmd_list_windows_entry = { "F:at:", 0, 0, "[-a] [-F format] " CMD_TARGET_SESSION_USAGE, 0, - NULL, cmd_list_windows_exec }; -- cgit From 4c42381410891c43b1326e95f150dfcf637b1e69 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 20 Oct 2014 23:35:28 +0000 Subject: Move template defines back into .c files. --- cmd-list-windows.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'cmd-list-windows.c') diff --git a/cmd-list-windows.c b/cmd-list-windows.c index 1317ecb1..5f73e8d2 100644 --- a/cmd-list-windows.c +++ b/cmd-list-windows.c @@ -27,11 +27,23 @@ * List windows on given session. */ +#define LIST_WINDOWS_TEMPLATE \ + "#{window_index}: #{window_name}#{window_flags} " \ + "(#{window_panes} panes) " \ + "[#{window_width}x#{window_height}] " \ + "[layout #{window_layout}] #{window_id}" \ + "#{?window_active, (active),}"; +#define LIST_WINDOWS_WITH_SESSION_TEMPLATE \ + "#{session_name}:" \ + "#{window_index}: #{window_name}#{window_flags} " \ + "(#{window_panes} panes) " \ + "[#{window_width}x#{window_height}] " + enum cmd_retval cmd_list_windows_exec(struct cmd *, struct cmd_q *); void cmd_list_windows_server(struct cmd *, struct cmd_q *); -void cmd_list_windows_session( - struct cmd *, struct session *, struct cmd_q *, int); +void cmd_list_windows_session(struct cmd *, struct session *, + struct cmd_q *, int); const struct cmd_entry cmd_list_windows_entry = { "list-windows", "lsw", -- cgit