Skip to content

Instantly share code, notes, and snippets.

@chigh
Created July 8, 2014 16:17
Show Gist options
  • Save chigh/cefc60153dd3915445c4 to your computer and use it in GitHub Desktop.
Save chigh/cefc60153dd3915445c4 to your computer and use it in GitHub Desktop.
# ===============================================================
# File: $HOME/.screenrc
# Purpose: Setup file for program "(GNU) screen"
# Compiled by: Clair High
# Latest update: Fri 22 Mar 2013
# Length and size: 168 lines 6067 chars
# ===============================================================
# ===============================================================
# NOTES
# ===============================================================
#
# Share
# -----
# ^A :multiuser
# ^A :acladd steve ('steve' is the username of the person who will
# connect to your screen session).
# screen -x anderson/ ('anderson' is the username of the person who is
# sharing the screen session. You need the / at
# the end.).
# screen -x screen_session_name
#
# ===============================================================
# VARIABLES - Boolean values (on/off)
# ===============================================================
altscreen on # default off
autodetach on # default: on
#deflogin on # default: on
#deflog on # Logging on by default
defmonitor on # Monitor window activity
multiuser on # default: off
nethack on # default: off
# nonblock on # default: off
# silence state/sec
# silencewait seconds # time before showing message
startup_message off # default: on
vbell on
#
# ===============================================================
# VARIABLES - Number values
# ===============================================================
defscrollback 204800
msgwait 5
#
# ===============================================================
# VARIABLES - Paths and Files (esp. programs)
# ===============================================================
# bufferfile: The file to use for commands
# "readbuf" ('<') and "writebuf" ('>'):
# hardcopydir: The directory which contains all hardcopies.
# hardcopydir ~/.hardcopy
# logfile: Define the logfile name.
# logtstamp: Include a timestamp in the log file after 300 seconds of
# inactivity.
#
bufferfile $HOME/.screen/screen_exchange.%n
hardcopydir $HOME/.screen
logfile $HOME/.screen/screenlog.%n
logtstamp on
logtstamp after 300
# ===============================================================
# VARIABLES - Strings
# ===============================================================
# COLOR TABLE
# ===============================================================
# 0 Black . leave color unchanged
# 1 Red b blue
# 2 Green c cyan
# 3 Brown / yellow d default color
# 4 Blue g green b bold
# 5 Purple k blacK B blinking
# 6 Cyan m magenta d dim
# 7 White r red r reverse
# 8 unused/illegal w white s standout
# 9 transparent y yellow u underline
# ===============================================================
# Messages
# ===============================================================
# There are two kinds of messages: "activity" and "bell"
# They are also the names of the commands that set the
# respective messages. In every message there can be "meta
# strings" which are replaced by values. A meta string starts
# with a percent sign and is then followed by one of the
# following letters: aAdDmMnstwWyY The meta strings refer to
# the current date and time or to a window title or number:
# %t - title
# %n - number (a single % still works)
# %d - day
# %D - weekday name
# %m - month
# %M - month name
# %y - year (2 digit)
# %Y - year (4 digit)
# %w - hour:minutes (24h format)
# %W - hour:minutes (12h format)
# %s - seconds
# %a - am/pm
# %A - AM/PM
# Older versions of screen used a single '%' character
# for window titles - but since version 3.7 this is
# obsoleted by '%n' and will vanish in future releases!
# So please update your screenrc to meet this convention!
#
# ===============================================================
# "~" stands for the "bell" character
shell -$SHELL
shelltitle "$ |bash"
#escape ^gG
#escape ``
bell_msg "Damn your eyes!~"
vbell_msg "Damn your eyes!~"
activity "There is a message for you. (%n)"
hardstatus alwayslastline
# hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
hardstatus string '%{= kG}[ %{W}%H%{g} ][%= %{=kw}%?%-Lw%?%{r}(%{= BW}%n*%f%t%?(%u)%?%{= kr})%{= kW}%?%+Lw%?%?%= %{g}][ %{B}%Y-%m-%d %{W}%c%{g} ]'
# emulate .logout message
pow_detach_msg "Vi ses!"
#termcapinfo xterm|xterms|xs|rxvt ti@:te@
time '%c:%s %M %d | load: %l%?'
# backtick 1 60 60 /usr/bin/uptime
# caption splitonly '%1`%'
# ===============================================================
# KEY BINDINGS
# ===============================================================
# By default
# unbound: -B--E-G--J-L---P-R-TUV--Y-
# bound: A-CD-F-HI-K-MNO-Q-S---WX-Z
bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max
bind k kill
bind P paste
bind y source $HOME/.screenrc
bind o only
bind ^r screen -t root 0 su -
bind \' title
bind / eval "scrollback 0" "scrollback 204800"
# F8 to turn the status bar off
bindkey -k k8 hardstatus alwayslastline
# F9 to turn the status bar on
bindkey -k k9 hardstatus alwaysignore
# F1 and F2 to move one screen forward or backward
#bindkey -k k1 prev
#bindkey -k k2 next
#bindkey -k F1 prev
#bindkey -k F2 next
#bindkey "^[Od" prev
#bindkey "^[Oc" next
chdir # switch to ~
# ===============================================================
# STARTUP SCREENS
# ===============================================================
# screen 1 # Create initial screen (start with 1 instead of 0)
# screen -t monkey ssh monkey
# screen top
# screen -t daemon 9 tail -f /var/log/daemon.log
# screen -t root 0
# screen 0:root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment