2010-02-02 22:34:16 +01:00
|
|
|
# $Id: screen-keys.conf,v 1.6 2010-02-02 21:34:16 nicm Exp $
|
2009-10-25 22:45:26 +01:00
|
|
|
#
|
|
|
|
# By Nicholas Marriott. Public domain.
|
2009-01-16 19:24:45 +01:00
|
|
|
#
|
|
|
|
# This configuration file binds many of the common GNU screen key bindings to
|
|
|
|
# appropriate tmux key bindings. Note that for some key bindings there is no
|
|
|
|
# tmux analogue and also that this set omits binding some commands available in
|
|
|
|
# tmux but not in screen.
|
2009-08-07 14:09:50 +02:00
|
|
|
#
|
|
|
|
# Note this is only a selection of key bindings and they are in addition to the
|
|
|
|
# normal tmux key bindings. This is intended as an example not as to be used
|
|
|
|
# as-is.
|
2009-01-16 19:24:45 +01:00
|
|
|
|
2009-08-07 14:09:50 +02:00
|
|
|
# Set the prefix to ^A.
|
2009-01-16 21:04:54 +01:00
|
|
|
unbind C-b
|
2009-01-16 19:24:45 +01:00
|
|
|
set -g prefix ^A
|
2009-08-07 14:09:50 +02:00
|
|
|
bind a send-prefix
|
2009-01-16 19:24:45 +01:00
|
|
|
|
2009-08-07 14:09:50 +02:00
|
|
|
# Bind appropriate commands similar to screen.
|
|
|
|
# lockscreen ^X x
|
|
|
|
unbind ^X
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^X lock-server
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind x
|
2009-01-16 19:24:45 +01:00
|
|
|
bind x lock-server
|
|
|
|
|
|
|
|
# screen ^C c
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^C
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^C new-window
|
2009-08-07 14:09:50 +02:00
|
|
|
bind c
|
2009-01-16 19:24:45 +01:00
|
|
|
bind c new-window
|
|
|
|
|
|
|
|
# detach ^D d
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^D
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^D detach
|
|
|
|
|
|
|
|
# displays *
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind *
|
2009-01-16 19:24:45 +01:00
|
|
|
bind * list-clients
|
|
|
|
|
|
|
|
# next ^@ ^N sp n
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^@
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^@ next-window
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^N
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^N next-window
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind " "
|
2009-01-16 19:24:45 +01:00
|
|
|
bind " " next-window
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind n
|
2009-01-16 19:24:45 +01:00
|
|
|
bind n next-window
|
|
|
|
|
|
|
|
# title A
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind A
|
2009-01-16 19:24:45 +01:00
|
|
|
bind A command-prompt "rename-window %%"
|
|
|
|
|
|
|
|
# other ^A
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^A
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^A last-window
|
|
|
|
|
|
|
|
# prev ^H ^P p ^?
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^H
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^H previous-window
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^P
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^P previous-window
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind p
|
2009-01-16 19:24:45 +01:00
|
|
|
bind p previous-window
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind BSpace
|
|
|
|
bind BSpace previous-window
|
2009-01-16 19:24:45 +01:00
|
|
|
|
|
|
|
# windows ^W w
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^W
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^W list-windows
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind w
|
2009-01-16 19:24:45 +01:00
|
|
|
bind w list-windows
|
|
|
|
|
|
|
|
# quit \
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind \
|
2009-10-25 22:58:05 +01:00
|
|
|
bind \ confirm-before "kill-server"
|
2009-01-16 19:24:45 +01:00
|
|
|
|
|
|
|
# kill K k
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind K
|
2009-10-25 22:58:05 +01:00
|
|
|
bind K confirm-before "kill-window"
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind k
|
2009-10-25 22:58:05 +01:00
|
|
|
bind k confirm-before "kill-window"
|
2009-01-16 19:24:45 +01:00
|
|
|
|
|
|
|
# redisplay ^L l
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind ^L
|
2009-01-16 19:24:45 +01:00
|
|
|
bind ^L refresh-client
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind l
|
2009-01-16 19:24:45 +01:00
|
|
|
bind l refresh-client
|
|
|
|
|
|
|
|
# split -v |
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind |
|
2009-01-16 19:24:45 +01:00
|
|
|
bind | split-window
|
|
|
|
|
|
|
|
# :kB: focus up
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind Tab
|
2009-01-16 19:24:45 +01:00
|
|
|
bind Tab down-pane
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind BTab
|
2009-01-16 19:24:45 +01:00
|
|
|
bind BTab up-pane
|
|
|
|
|
|
|
|
# " windowlist -b
|
2009-08-07 14:09:50 +02:00
|
|
|
unbind '"'
|
2009-01-16 19:24:45 +01:00
|
|
|
bind '"' choose-window
|