startup_message off
deflogin off
autodetach on

vbell off

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

bind 'P' colon "^p"

# Let's remove some dangerous key bindings ...
  bind k
  bind ^k
  bind .
  bind ^\
  bind \\
  bind ^h
  bind h

  bind '}' history

# bind Shift+PgUp/PgDn
bindkey -m "^[[5;2~" stuff ^b
bindkey -m "^[[6;2~" stuff ^f


# Stop screens freezing
bind s xon

# Status line
#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 '%t'
#http://www.debian-administration.org/articles/560

# remap the new window options to key history separate
bind c screen bash -ic 'HISTFILE=~/.bash_history.${WINDOW} bash -l'
bind ^C screen bash -ic 'HISTFILE=~/.bash_history.${WINDOW} bash -l'

# export PROMPT_COMMAND="history -a; history -c; history -r; ${PROMPT_COMMAND}"
# write to history file when executed. We may already have this

screen -t "window 0" 0 bash -ic 'HISTFILE=~/.bash_history.${WINDOW} bash -l'
screen -t "window 1" 1 bash -ic 'HISTFILE=~/.bash_history.${WINDOW} bash -l'

deflogin on
#screen -t Screen1 0
deflogin off
#screen -t Screen2 1
#screen -t Screen3 2
#screen -t Screen4 3
#screen -t Screen5 4
#screen -t Screen6 5

caption always "%?%{wk}%-Lw%?%{yK}%n*%f %t%?(%u)%?%?%{wk}%+Lw%? %{gk}%=%c %{yk}%d/%M/%Y"

#!/bin/bash

# fixSSHAgent

screen_ssh_agent=./tmp/${USER}-screen-ssh-agent.sock.
ln -snf ${SSH_AUTH_SOCK} ${screen_ssh_agent}

SSH_AUTH_SOCK=./tmp/${USER}-screen-ssh-agent.sock.