Skip to content

Instantly share code, notes, and snippets.

@riywo
Created October 12, 2012 15:03
Show Gist options
  • Save riywo/3879639 to your computer and use it in GitHub Desktop.
Save riywo/3879639 to your computer and use it in GitHub Desktop.
screenrcもうちょっとでできそう
escape ^z^z
### Pandemonium
# 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
# **Bad with messages**
# 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
### Display
# $TERM for 256 color (screen needs --enable-colors256 configure option)
term xterm-256color
# Wait seconds for messages
msgwait 2
msgminwait 1
# Caption
# hardstatus string "%?%h%:%t (screen #%n on %H)%?"
caption always "%{=r dd}%-Lw%40L>%?%F%{=b Rw}%:[%? %n%f %t %?%F%{-}%:]%?%+Lw %?%F%-007=[%02c]%:%=%?"
sorendition "+rb .G"
shelltitle 'bash'
### Buffer
# scroll buffer (lines)
defscrollback 10240
# buffer byte size of screen?
termcapinfo xterm* OL=8196
### Behavior
# New windo uses home dir
chdir
# Confirm when a window is finished
# zombie ^[
# Protection from attacks
multiuser off
idle off
# No visible bell
vbell off
# Use autodetach because of using unstable client
autodetach on
# No startup message
startup_message off
# No login, otherwise /var/run/utemp will be squashed.
deflogin off
### Key bind
# Ctrl+cursor down
bindkey "^[[1;5B" screen
# Ctrl+cursor right
bindkey "^[[1;5C" next
# Ctrl+cursor left
bindkey "^[[1;5D" prev
bind w windowlist -b
bind ^] paste [.]
bind u eval 'encoding utf8 utf8' 'echo "change UTF-8"'
bind e eval 'encoding eucjp utf8' 'echo "change eucJP"'
bind s eval 'encoding sjis utf8' 'echo "change SJIS"'
# Use cursor in copy mode
markkeys h=^B:l=^F:$=^E:^U=^Z:^D=^V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment