My .screenrc
I use screen on both Linux and OS X shells. The .screenrc shown here is a collection of standard techniques you’ll find all over the net. Absolute must-have: the “alternative hardstatus”, which uses ANSI colors and displays a list of active windows, the host name and the local date/time.
I just started using screen on OS X and found that the function key binding does not work; but I’m not using them anyway, so I didn’t look for a workaround. But it’s nice to be able to use the same configuration for vastly different systems.
# kill startup message
startup_message off
# detach on hangup
autodetach on
# define a bigger scrollback, default is 100 lines
defscrollback 1024
# shell
#shell -bash
# putty bindings
#bindkey \"^[OC\" next
#bindkey \"^[OD\" prev
# other bindings
#bindkey -k F1 select 0 ## F11 = screen 0... avoid this screen :/
#bindkey -k k1 select 1 ## F1 = screen 1
#bindkey -k k2 select 2 ## F2 = screen 2
#bindkey -k k3 select 3 ## F3 = screen 3
#bindkey -k k4 select 4 ## F4 = screen 4
#bindkey -k k5 select 5 ## F5 = screen 5
#bindkey -k k6 select 6 ## F6 = screen 6
#bindkey -k k7 select 7 ## F7 = screen 7
#bindkey -k k8 select 8 ## F8 = screen 8
#bindkey -k k9 select 9 ## F9 = screen 9
#bindkey -k k0 select 10 # F10 = screen 10
#bindkey -k F2 command ## F12 = do a command
# An alternative hardstatus to display a bar at the bottom listing the
# windownames and highlighting the current windowname in blue. (This is only
# enabled if there is no hardstatus setting for your terminal)
hardstatus on
hardstatus alwayslastline
hardstatus string \"%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a \"
