Skip to content

Instantly share code, notes, and snippets.

@oceanBT
Forked from ChrisWills/.screenrc-main-example
Last active August 14, 2017 22:00
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 oceanBT/8d18622b54896e0f7147a8170d13ab03 to your computer and use it in GitHub Desktop.
Save oceanBT/8d18622b54896e0f7147a8170d13ab03 to your computer and use it in GitHub Desktop.
A nice default screenrc
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# Enables use of shift-PgUp and shift-PgDn
termcapinfo xterm|xterms|xs|rxvt ti@:te@
# Erase background with current bg color
defbce "on"
# Enable 256 color term
term xterm-256color
# Cache 30000 lines for scroll back
defscrollback 30000
# New mail notification
backtick 101 30 15 $HOME/bin/mailstatus.sh
hardstatus alwayslastline
# Very nice tabbed colored hardstatus line
hardstatus string '%{= Kd} %{= Kd}%-w%{= Kr}[%{= KW}%n %t%{= Kr}]%{= Kd}%+w %-= %{KG} %H%{KW}|%{KY}%101`%{KW}|%D %M %d %Y%{= Kc} %C%A%{-}'
# change command character from ctrl-a to ctrl-b (emacs users may want this)
#escape ^Bb
# Hide hardstatus: ctrl-a f
bind f eval "hardstatus ignore"
# Show hardstatus: ctrl-a F
bind F eval "hardstatus alwayslastline"
#scrolling with mouse-wheel
termcapinfo xterm ti@:te@
termcapinfo xterm-color ti@:te@
# easier scroll
bindkey "^[[5~" eval 'copy' 'stuff ^b' # PgUp | Enter copy/scrollback mode and page up
bindkey "^[[6~" eval 'copy' "stuff ^f' # PgDown | Enter copy/scrollback mode and page down
bind c screen 1 # window numbering starts at 1 not 0
bind 0 select 10
# control-left and control-right switch windows
bindkey "^[[5D" prev
bindkey "^[[5C" next
# f1-8 switch to those windows (OSX keeps 9-12 reserved for dashboard)
bindkey "^[OP" select 1
bindkey "^[OQ" select 2
bindkey "^[OR" select 3
bindkey "^[OS" select 4
bindkey "^[[15~" select 5
bindkey "^[[17~" select 6
bindkey "^[[18~" select 7
bindkey "^[[19~" select 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment