# GNU screen config

# turn off that annoying message
startup_message  off

# turn off that ugly vbell!
vbell                 off

# Emulate a logout msg
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."

# Needed to have a login shell
shell -zsh
shelltitle zsh

# default windows
screen -t htop 0 htop
screen -t zsh 1 zsh

backtick 1 5 5 uptime
caption always "%1`"

hardstatus alwayslastline
hardstatus string '%{= gk}%{kg}[ %{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}'

termcapinfo xterm ti@:te@
termcapinfo xterm-color ti@:te@

# only Shift+k to kill - prevent accidents
bind k
bind ^k
bind K kill

# Resize the current region. The space will be removed from or added to the region below or if there's not enough space from the region ab
bind = resize =
bind + resize +3
bind - resize -3

# Split screen controls
bind s split         # disable C-a s (freeze)
bind o focus
bind x remove
bind m monitor

bind k focus up
bind j focus down
bind h focus left
bind l focus right

# binding the F1 - F8 keys to the first 8 screens, F11 = previous | F12 = next
#bindkey -k k1 select 0
#bindkey -k k2 select 1
#bindkey -k k3 select 2bindkey -k F1 prev

# Toggle 'fullscreen mode'
bind f eval "caption splitonly" "hardstatus ignore"
bind F eval "caption always"    "hardstatus alwayslastline"

bind R eval "source $HOME/.screenrc" "echo '.screenrc reloaded!'"
bind ' ' windowlist -b

#bindkey -k k4 select 3
#bindkey -k k5 select 4
#bindkey -k k6 select 5
#bindkey -k k7 select 6
#bindkey -k k8 select 7
bindkey -k F2 next