summaryrefslogtreecommitdiffstats
path: root/key-bindings.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-25 12:18:51 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-25 12:18:51 +0000
commit7b847ced4af09b7da66a7b0b59fbab68f07bcb50 (patch)
tree4f616b2184ffe0c246920882ab093fc44a71af94 /key-bindings.c
parent4f1d81c4ce89440bd2f155cbb8002b622f13ce0b (diff)
Add a choose-client command and extend choose-{session,window} to accept a
template. After a choice is made, %% (or %1) in the template is replaced by the name of the session, window or client suitable for -t and the result executed as a command. So, for example, "choose-window "killw -t '%%'"" will kill the selected window. The defaults if no template is given are (as now) select-window for choose-window, switch-client for choose-session, and detach-client for choose-client (now bound to D).
Diffstat (limited to 'key-bindings.c')
-rw-r--r--key-bindings.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/key-bindings.c b/key-bindings.c
index b2ccc4aa..907163f0 100644
--- a/key-bindings.c
+++ b/key-bindings.c
@@ -130,6 +130,7 @@ key_bindings_init(void)
{ ']', 0, &cmd_paste_buffer_entry },
{ 'c', 0, &cmd_new_window_entry },
{ 'd', 0, &cmd_detach_client_entry },
+ { 'D', 0, &cmd_choose_client_entry },
{ 'f', 0, &cmd_command_prompt_entry },
{ 'i', 0, &cmd_display_message_entry },
{ 'l', 0, &cmd_last_window_entry },
@@ -143,7 +144,7 @@ key_bindings_init(void)
{ 'x', 0, &cmd_confirm_before_entry },
{ '{', 0, &cmd_swap_pane_entry },
{ '}', 0, &cmd_swap_pane_entry },
- { '\002', 0, &cmd_send_prefix_entry },
+ { '\002', /* C-b */ 0, &cmd_send_prefix_entry },
{ '1' | KEYC_ESCAPE, 0, &cmd_select_layout_entry },
{ '2' | KEYC_ESCAPE, 0, &cmd_select_layout_entry },
{ '3' | KEYC_ESCAPE, 0, &cmd_select_layout_entry },
@@ -162,7 +163,7 @@ key_bindings_init(void)
{ KEYC_LEFT | KEYC_CTRL, 1, &cmd_resize_pane_entry },
{ KEYC_RIGHT | KEYC_CTRL, 1, &cmd_resize_pane_entry },
{ 'o' | KEYC_ESCAPE, 0, &cmd_rotate_window_entry },
- { '\017', 0, &cmd_rotate_window_entry },
+ { '\017', /* C-o */ 0, &cmd_rotate_window_entry },
};
u_int i;
struct cmd *cmd;