krkr
11/10/2011 - 7:09 AM

.screenrc

.screenrc

# ------------------------------------------------------------------------------
# SCREEN KEYBINDINGS
# ------------------------------------------------------------------------------

startup_message off
deflogin on
autodetach on

# turn visual bell on
vbell on
vbell_msg "   Wuff  ----  Wuff!!  "

# define a bigger scrollback, default is 100 lines
defscrollback 200

# KeyBindings
bindkey -k k1 prev # bind F1 to move one screen forward
bindkey -k k2 next # bind F2 to move one screen backward
bindkey -k F1 kill  # bind f11 to kill terminal
bindkey -k F2 quit  # bind f12 to quit screen

# Remove some stupid / dangerous key bindings
bind ^k
bind L #bind L
bind ^\
# Make them better
bind \\ quit
bind K kill
bind I login on
bind O login off
bind } history

bindkey "^[k" eval "copy" "stuff ^b"  # enter copy mode and move up one page
bindkey "^k" eval "copy" "stuff k"    # enter copy mode and move up one line
bindkey -m "^[k" stuff ^b             # move up one page
bindkey -m "^k" stuff k               # move up one line

#bindkey -k k9 split -h  # F9
#bindkey -k k; split -v # F10
bind + resize +1
bind - resize -1

# An example of a "screen scraper" which will launch urlview on the current
# screen window
#
#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"

# ------------------------------------------------------------------------------
# TERMINAL SETTINGS
# ------------------------------------------------------------------------------

# The vt100 description does not mention "dl". *sigh*
termcapinfo vt100 dl=5\E[M

# turn sending of screen messages to hardstatus off
hardstatus on
# Set the hardstatus prop on gui terms to set the titlebar/icon title
termcapinfo lxterm*|xterm*|rxvt*|kterm*|terminator*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
# use this for the hard status string
#change the hardstatus settings to give an window list at the bottom of the
#screen, with the time and date and with the current window highlighted
hardstatus alwayslastline 
#hardstatus string '%{= kG}%-Lw%{= kW}%50> %n%f* %t%{= kG}%+Lw%< %{= kG}%-=%c:%s%{-}'
#hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
#hardstatus string "%{bk}%?%-Lw%?%{wb}%n*%f %t%?(%u)%?%{bk}%?%+Lw%= %{mk}@ %H %{ck}%Y%{bk}-%{ck}%m%{bk}-%{ck}%d %{yk}%D %{gk}%c"
#hardstatus string "%{=b .r}%D %d/%m %{w}- %{r}%c%{w} || [%{g}@%H%{w}] %w %= %1` | %{b}%l%{w}"
#hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
#hardstatus string '%{= dW}[ %{dg}%H %{dW}][%{dc}%= %?%-Lw%?%{dy}(%{dW}%n*%f %t%?(%u)%?%{dy})%{= dc}%?%+Lw%?%?%= %{dW}][%{dM}%l%{dW}][%{dy} %m/%d %c %{dW}]'
#hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}]%{=b C}[ %m/%d %c ]%{W}'
#hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
#hardstatus string "%{+b Rk}(%{-b g}$LOGNAME@%H%{+b R}) (%{-b g}%C %a%{+b R}) %{-b g} %n %t %h"
#hardstatus string '%{= kG}%-Lw%{= kW}%50> %n%f* %t%{= kG}%+Lw%< %{= kG}%-=%c:%s%{-}'
#hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]'
#hardstatus string '%{= kG}%{C}Screen: %{c}%{= kG}[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{C} %d-%m %{W}%c %{g}]'
hardstatus string "%{= kG}%{g}[ %{B}$LOGNAME@%H%{g} ] [%= %{= kw}%?%-Lw%?%{B}<< %n*%f%t%?(%u)%? >>%{w}%?%+Lw%?%?%= %{g}] [ %{B}%c:%s%{g} ]"

# set these terminals up to be 'optimal' instead of vt100
termcapinfo xterm*|linux*|rxvt*|Eterm* OP

# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
# (This fixes the "Aborted because of window size change" konsole symptoms found
#  in bug #134198)
termcapinfo lxterminal 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

# To get screen to add lines to xterm's scrollback buffer, uncomment the
# following termcapinfo line which tells xterm to use the normal screen buffer
# (which has scrollback), not the alternate screen buffer.
#
#termcapinfo xterm|xterms|xs|rxvt ti@:te@

# Enable non-blocking mode to better cope with flaky ssh connections.
defnonblock 5

# ------------------------------------------------------------------------------
# STARTUP SCREENS
# ------------------------------------------------------------------------------

screen -t zsh1 1 zsh
screen -t zsh2 2 zsh
screen -t HTOP 3 htop
screen -t IFTOP 4 sudo iftop -i eth0

select 1