# $Id: screen-keys.conf,v 1.6 2010/02/02 21:34:16 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# 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.
#
# 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.
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Bind appropriate commands similar to screen.
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
# screen ^C c
unbind ^C
bind ^C new-window
unbind c
bind c new-window
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# other ^A
unbind ^A
bind ^A last-window
# prev ^H ^P p ^?
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window
# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows
# quit
unbind
bind confirm-before "kill-server"
# kill K k
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client
# split -v |
unbind |
bind | split-window -h
unbind -
bind - split-window -v
# " windowlist -b
unbind '"'
bind '"' choose-window
########################################
set -g history-limit 8000
set -g mouse-select-pane on
set -g set-titles on
set -g set-titles-string "[###S.#I #W] #T"
set -g status-left ""
set -g visual-bell on
set -g status-right "#[bg=yellow,fg=black,bold] #(cut -d' ' -f1 /proc/loadavg)#[nobold] #(cut -d' ' -f2,3 /proc/loadavg) "
setw -g window-status-current-format "#[bold,fg=white,bg=magenta][[#I:#W#F]]#[default]"
setw -g automatic-rename on
setw -g aggressive-resize on
setw -g mode-keys vi
setw -g mode-mouse off
setw -g monitor-activity on
setw -g window-status-alert-attr reverse,bold
setw -g alternate-screen on
set -g utf8 on
set -g mouse-utf8 on
set -g base-index 1
bind '0' select-window -t 10
# setw -g xterm-keys on
bind-key b set-option status
bind-key m command-prompt "split-window 'info %%'"
set -g update-environment "DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION LANG XAUTHORITY XMODIFIERS XIM GTK_IM_MODULE QT_IM_MODULE DEPENDS"
# http://blog.oldworld.fr/index.php?post/2010/03/21/256-colors-terminal-with-tmux-and-urxvt
set -g default-terminal "screen-256color"
-