Skip to content

Instantly share code, notes, and snippets.

@shyouhei
Created January 1, 2010 00:42
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shyouhei/266984 to your computer and use it in GitHub Desktop.
Save shyouhei/266984 to your computer and use it in GitHub Desktop.
source .screen/stem4
# Keys
# \233 is "Meta-Ctrl-[", or "Meta-Esc".
escape \233\233
# no zombie ... upper screen termination should propagate to this one.
zombie
# To use mouse. XT capability is screen specific, not seen in the system
# termcap / terminfo.
termcapinfo * XT
# Z0/Z1 are also screen specific.
termcapinfo xterm*|kterm*|screen* Z0=\E[?3h:Z1=\E[?3l
# To use hardware status line
termcapinfo xterm*|kterm*|screen* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
hardstatus on
# To use 256 colors. AB/AF are also screen specific.
termcapinfo xterm*|kterm*|screen* Co#256:pa#32767:AB=\E[48;5;%dm:AF=\E[38;5;%dm
defbce on
# To use resize-window
termcapinfo xterm*|kterm*|screen* is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l
# Protection from attacks
multiuser off
idle off
# No visible bell because a stem screen should not intercept a bell.
vbell off
# No autodetach because a detached stem screen is useless.
autodetach off
# No startup message because a stem screen should not be invoked manually
startup_message off
# No login, otherwise /var/run/utemp will be squashed.
deflogin off
# obuflimit and autonuke can be controlled via termcap, but we do not have a
# way to get those values...
# A stem screen's output is another scren, so it is way much faster than a
# normal terminal such as xterm. 2 pyhisical pages should suffice.
termcapinfo screen* OL=8196
termcapinfo xterm* OL=256
# Nuke and pave.
autonuke on
# Dsiable scroll buffer, should be implemented in upper screens.
defscrollback 0
# chdir is useful for invoking scripts there.
chdir /home/shyouhei/.screen
source defaults
# Tell applications who this is. The ``screen-256color'' terminfo is in the
# ncurses-term package for debian.
term screen-256color
# Keys
escape ^Tt
zombie ^[
bind w windowlist -b
bind ^] paste [.]
bind u eval "encoding UTF-8"
bind e eval "encoding eucJP"
bind s eval "encoding SJIS"
bind j eval "encoding jis"
setenv LANG ja_JP.UTF-8
# default shell to invoke with ^T-c
shell /bin/zsh
# The scroll buffer
defscrollback 8195
markkeys h=^B:l=^F:$=^E:^U=^Z:^D=^V
# Messages
msgwait 3
msgminwait 2
hardstatus string "%?%h%:%t (screen #%n on %H)%?"
caption always "%{=r dd}%-Lw%40L>%?%F%{=b dR}%:[%? %n%f %t %?%F%{-}%:]%?%+Lw %?%F%-024=GNU Screen of Git master%:%=%?"
sorendition "+rb .G"
# default screens
chdir
screen -t zsh 0 zsh -l
source defaults
caption always "%{= dd}%h%-023= %Y/%m/%d %02C:%s %A"
screen screen -qUmc leaf
source defaults
caption always "%{= dd}net %0`%=%1`%{= dd}"
backtick 0 0 0 ruby netmonitor.rb
backtick 1 0 0 sudo ruby hddmonitor.rb
screen screen -qUmc stem1
source defaults
caption always "%{= dd}%0`%=Battery %1`"
backtick 0 0 0 ruby cpumonitor.rb
backtick 1 9 9 ruby batmonitor.rb
screen screen -qUmc stem2
source defaults
caption always "%{= dd}%`"
backtick 0 0 0 sudo ruby logmonitor.rb
screen screen -qUmc stem3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment