| 1 | # |
|---|
| 2 | # Example of a user's .screenrc file |
|---|
| 3 | # |
|---|
| 4 | |
|---|
| 5 | # This is how one can set a reattach password: |
|---|
| 6 | # password ODSJQf.4IJN7E # "1234" |
|---|
| 7 | |
|---|
| 8 | # no annoying audible bell, please |
|---|
| 9 | vbell on |
|---|
| 10 | bell 'bell in window %n' |
|---|
| 11 | msgwait 3600 |
|---|
| 12 | |
|---|
| 13 | defwrap on |
|---|
| 14 | |
|---|
| 15 | # detach on hangup |
|---|
| 16 | autodetach on |
|---|
| 17 | |
|---|
| 18 | # don't display the copyright page |
|---|
| 19 | startup_message off |
|---|
| 20 | |
|---|
| 21 | # emulate .logout message |
|---|
| 22 | pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." |
|---|
| 23 | |
|---|
| 24 | # advertise hardstatus support to $TERMCAP |
|---|
| 25 | # termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' |
|---|
| 26 | |
|---|
| 27 | # make the shell in every window a login shell |
|---|
| 28 | #shell -$SHELL |
|---|
| 29 | |
|---|
| 30 | # autoaka testing |
|---|
| 31 | # shellaka '> |tcsh' |
|---|
| 32 | # shellaka '$ |sh' |
|---|
| 33 | |
|---|
| 34 | shelltitle sh |
|---|
| 35 | |
|---|
| 36 | # set every new windows hardstatus line to somenthing descriptive |
|---|
| 37 | # defhstatus "screen: ^En (^Et)" |
|---|
| 38 | |
|---|
| 39 | defscrollback 1024 |
|---|
| 40 | |
|---|
| 41 | # don't kill window after the process died |
|---|
| 42 | # zombie "^[" |
|---|
| 43 | |
|---|
| 44 | # logging |
|---|
| 45 | logfile "$HOME/var/screen/%Y%m%d-%n.log" |
|---|
| 46 | deflog off |
|---|
| 47 | |
|---|
| 48 | ################ |
|---|
| 49 | # |
|---|
| 50 | # xterm tweaks |
|---|
| 51 | # |
|---|
| 52 | |
|---|
| 53 | #xterm understands both im/ic and doesn't have a status line. |
|---|
| 54 | #Note: Do not specify im and ic in the real termcap/info file as |
|---|
| 55 | #some programs (e.g. vi) will not work anymore. |
|---|
| 56 | termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l |
|---|
| 57 | terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l |
|---|
| 58 | |
|---|
| 59 | #80/132 column switching must be enabled for ^AW to work |
|---|
| 60 | #change init sequence to not switch width |
|---|
| 61 | termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l |
|---|
| 62 | |
|---|
| 63 | # Make the output buffer large for (fast) xterms. |
|---|
| 64 | termcapinfo xterm* OL=10000 |
|---|
| 65 | |
|---|
| 66 | # tell screen that xterm can switch to dark background and has function |
|---|
| 67 | # keys. |
|---|
| 68 | termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' |
|---|
| 69 | termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' |
|---|
| 70 | termcapinfo xterm 'kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:kP=\E[H:kN=\E[6~' |
|---|
| 71 | |
|---|
| 72 | # special xterm hardstatus: use the window title. |
|---|
| 73 | #### termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' |
|---|
| 74 | |
|---|
| 75 | # our xterm has colors! (rxvt, too) |
|---|
| 76 | termcap xterm* 'AF=\E[3%dm:AB=\E[4%dm' |
|---|
| 77 | terminfo xterm* 'AF=\E[3%p1%dm:AB=\E[4%p1%dm' |
|---|
| 78 | termcap kterm* 'AF=\E[3%dm:AB=\E[4%dm' |
|---|
| 79 | terminfo kterm* 'AF=\E[3%p1%dm:AB=\E[4%p1%dm' |
|---|
| 80 | termcap vt100 'AF=\E[3%dm:AB=\E[4%dm' |
|---|
| 81 | terminfo vt100* 'AF=\E[3%p1%dm:AB=\E[4%p1%dm' |
|---|
| 82 | termcap vt102 'AF=\E[3%dm:AB=\E[4%dm' |
|---|
| 83 | terminfo vt102* 'AF=\E[3%p1%dm:AB=\E[4%p1%dm' |
|---|
| 84 | |
|---|
| 85 | #terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' |
|---|
| 86 | termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' |
|---|
| 87 | |
|---|
| 88 | # emulate part of the 'K' charset |
|---|
| 89 | termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' |
|---|
| 90 | |
|---|
| 91 | # xterm-52 tweaks: |
|---|
| 92 | # - uses background color for delete operations |
|---|
| 93 | termcapinfo xterm ut |
|---|
| 94 | |
|---|
| 95 | ################ |
|---|
| 96 | # |
|---|
| 97 | # wyse terminals |
|---|
| 98 | # |
|---|
| 99 | |
|---|
| 100 | #wyse-75-42 must have flow control (xo = "terminal uses xon/xoff") |
|---|
| 101 | #essential to have it here, as this is a slow terminal. |
|---|
| 102 | termcapinfo wy75-42 xo:hs@ |
|---|
| 103 | |
|---|
| 104 | # New termcap sequences for cursor application mode. |
|---|
| 105 | termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J |
|---|
| 106 | |
|---|
| 107 | ################ |
|---|
| 108 | # |
|---|
| 109 | # other terminals |
|---|
| 110 | # |
|---|
| 111 | |
|---|
| 112 | #make hp700 termcap/info better |
|---|
| 113 | termcapinfo hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@' |
|---|
| 114 | |
|---|
| 115 | # Extend the vt100 desciption by some sequences. |
|---|
| 116 | termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC |
|---|
| 117 | terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC |
|---|
| 118 | |
|---|
| 119 | |
|---|
| 120 | ################ |
|---|
| 121 | # |
|---|
| 122 | # keybindings |
|---|
| 123 | # |
|---|
| 124 | |
|---|
| 125 | #remove some stupid / dangerous key bindings |
|---|
| 126 | bind k |
|---|
| 127 | bind ^k |
|---|
| 128 | bind . |
|---|
| 129 | bind ^\ |
|---|
| 130 | bind \\ |
|---|
| 131 | bind ^h |
|---|
| 132 | bind h |
|---|
| 133 | #make them better |
|---|
| 134 | bind 'K' kill |
|---|
| 135 | bind 'I' login on |
|---|
| 136 | bind 'O' login off |
|---|
| 137 | bind '}' history |
|---|
| 138 | bind x |
|---|
| 139 | bind ^x |
|---|
| 140 | bind ^g |
|---|
| 141 | bind ^S |
|---|
| 142 | bind ^Q |
|---|
| 143 | bind q |
|---|
| 144 | |
|---|
| 145 | # Yet another hack: |
|---|
| 146 | # Prepend/append register [/] to the paste if ^a^] is pressed. |
|---|
| 147 | # This lets me have autoindent mode in vi. |
|---|
| 148 | register [ "\033:se noai\015a" |
|---|
| 149 | register ] "\033:se ai\015a" |
|---|
| 150 | bind ^] paste [.] |
|---|
| 151 | |
|---|
| 152 | # defkanji euc |
|---|
| 153 | #defencoding eucJP |
|---|
| 154 | |
|---|
| 155 | ################ |
|---|
| 156 | # |
|---|
| 157 | # default windows |
|---|
| 158 | # |
|---|
| 159 | |
|---|
| 160 | # screen -t local 0 |
|---|
| 161 | # screen -t mail 1 elm |
|---|
| 162 | # screen -t 40 2 rlogin faui40 |
|---|
| 163 | |
|---|
| 164 | # caption always "%3n %t%? @%u%?%? [%h]%?" |
|---|
| 165 | |
|---|
| 166 | ### >= 3.09.11 |
|---|
| 167 | caption always "%{=r} %-Lw%{=u dd}%n%f %t%{-}%+Lw %= %l" |
|---|
| 168 | hardstatus alwaysignore |
|---|
| 169 | ### <= 3.09.09 |
|---|
| 170 | # hardstatus alwayslastline "%w" |
|---|
| 171 | |
|---|
| 172 | # allpartial on |
|---|
| 173 | |
|---|
| 174 | # screen ���Emacs �ǿ����Фʤ��� |
|---|
| 175 | term mlterm |
|---|
| 176 | |
|---|
| 177 | escape ^]^] |
|---|
| 178 | bind 'e' screen -t emacs emacs -nw |
|---|
| 179 | bind 'r' screen -t root su |
|---|
| 180 | bind ' ' other |
|---|
| 181 | bind 's' source $HOME/etc/screen-init |
|---|
| 182 | bindkey -k kb stuff \010 |
|---|
| 183 | |
|---|
| 184 | # S split ʬ�� TAB focus ����ΰ���� |
|---|
| 185 | # Q only ¾��ΰ������ X remove ����ΰ������# multiuser on |
|---|
| 186 | # acladd hirose |
|---|
| 187 | # #aclchg hirose +rwx "#?" |
|---|
| 188 | # #acldel hirose |
|---|
| 189 | # aclgrp username [groupname] |
|---|
| 190 | # sessionname hiroseterm |
|---|
| 191 | |
|---|
| 192 | # http://unknownplace.org/memo/2005/12/17 |
|---|
| 193 | bind -c REGION 2 split |
|---|
| 194 | bind -c REGION 1 only |
|---|
| 195 | bind -c REGION 0 remove |
|---|
| 196 | bind -c REGION o focus |
|---|
| 197 | # bind -c REGION ^ resize |
|---|
| 198 | bind ^x command -c REGION |
|---|
| 199 | |
|---|
| 200 | # ���ԡ��⡼��markkeys h=^B:l=^F:$=^E:^D=^V |
|---|