Skip to content

Instantly share code, notes, and snippets.

@dankempster
Created April 27, 2011 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dankempster/944921 to your computer and use it in GitHub Desktop.
Save dankempster/944921 to your computer and use it in GitHub Desktop.
My .screenrc File
# Useful Resources:
# http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html
term xterm
# Turn off the splash screen
startup_message off
# This makes the shells think they are login shells and have to do full initialisation - It also slows down screen when creating a new screen :(
shell -$SHELL
# Instead of Control-a, make the escape/command character be Control-t
escape ^Zz
# Use a 3000-line scrollback buffer
defscrollback 3000
# Set Up Hardstatus so I know the host I'm connected to and which screen I'm on
caption string "%?%F%{= Bk}%? %C%A %D %d-%m-%Y %{= kB} %t%= %?%F%{= Bk}%:%{= wk}%? %n "
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
# Set up screen how I like it
# screen -t <screen-name> -e <cmd-to-run>
# Allow me to use the terminal scroll bars within screen
termcapinfo xterm ti@:te@
# From http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html
# Q: My xterm scrollbar does not work with screen.
# A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text buffer. (The scrollbar also does not work when you start e.g. ‘vi’). You can tell screen not to use these initialisations by adding the line “termcapinfo xterm ti@:te@” to your ~/.screenrc file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment