Having fun with screen

A while back i delivered a RH403 course in our Virtual Technology, or VT for short, environment in the US. As always i learn something new every day and this time a student  surprised me with a very cool screen setup. Now, i don’t use screen that often, im just learning tmux at this moment, but i want to share this setup anyway.
# vim: fo=cq tw=0

#Custom Stuff
caption always “%{= ky}%H >> %{= kg}%-Lw%{= W}%50>%n* %t%{-}%+Lw%< %-=<< (%M-%d,%Y %c.%s)”
##caption always “%{= kg} %-Lw%{= W}%50>%n* %t%{-}%+Lw%< %-=<< (%M-%d,%Y %c.%s)”

activity “%c activity -> %n%f %t”
bell “%c bell -> %n%f %t^G”
vbell_msg ” *beep* ”

startup_message off

defscrollback 10000

ignorecase on

# cleanup screen after viewing/editing
altscreen on

# redefine C-a which is a Bash “emacs” key
escape ^\\

multiuser off
# Always start screen with utf8 enabled. (screen -U)
defutf8 on

# screen #0 is for viewing, start up #1 as working screen
screen 0
screen 1

# custom keys
bind Y readreg
bind P paste
# dangerous key, too close to “copy mode”
bind ] copy
bind ` paste .

# on Fedora Konsole doesn’t have a hardstatus line
hardstatus off

# Enable 256-color mode when screen is started with TERM=xterm-256color
# Taken from: http://frexx.de/xterm-256-notes/
# Note that TERM != “xterm-256color” within a screen window. Rather it is
# “screen” or “screen-bce”
# terminfo and termcap for nice 256 color terminal
# allow bold colors – necessary for some reason
attrcolor b “.I”
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm-256color ‘Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm’

Rik has written 7 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>