Skip to content

Instantly share code, notes, and snippets.

@samduy
Last active March 27, 2018 08:30
Show Gist options
  • Save samduy/202eb8d8a3ba9b527a60edbc19613516 to your computer and use it in GitHub Desktop.
Save samduy/202eb8d8a3ba9b527a60edbc19613516 to your computer and use it in GitHub Desktop.
Configuration for a nice GNU Screen
# Author: samduy@github
# Clear the screen after exiting Vim
altscreen on
# using mouse to select region
# turning this on will lose the normal mouse control like select/copy/paste
#mousetrack on
# turn off welcome message
startup_message off
# 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* 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
# A nice hardstatus with useful information
hardstatus alwayslastline '%{= G}[ %{G}%H %{g}][%= %{= w}%?%-Lw%?%{= R}%{+b}%n%f %t%?%{= R}(%u)%?%{= w}%+Lw%?%= %{= g}][ %{y}Load: %l %{g}][%{B}%Y-%m-%d %{W}%c:%s %{g}]'
# Another nice caption for each panel
# Highlight the current (focused) panel with RED color
backtick 1 5 5 true
termcapinfo rxvt* 'hs:ts=\E]2;:fs=\007:ds=\E]2;\007'
caption string "%?%F%{= rW}%:%{= kw}%?%Y-%m-%d %?%F%{= rW}%:%{= kw}%?%c %?%F%{= rY}%{+b}%:%{= kG}%{-b}%?[%n %t] %?%F%{= rW}%:%{= kw}%?%h %1`"
caption always
# Hide hardstatus: ctrl-a f
bind f eval "hardstatus ignore"
# Show hardstatus: ctrl-a F
bind F eval "hardstatus alwayslastline"
# Resize the panel (enlarge)
bind > resize +10
# Resize the panel (reduce)
bind < resize -10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment